git for windows+TortoiseGit客户端的使用二

时间:2023-03-08 17:08:53

通常都是使用git协议方式来连接服务器,然后使用https方式的连接方法,是如何设置的:

先登录github服务器,获取远程服务器仓库:

git for windows+TortoiseGit客户端的使用二

在本地创建一个存放仓库的目录,然后使用tortoiseGit客户端工具进行克隆操作:

git for windows+TortoiseGit客户端的使用二

在弹出窗口中的URL中输入刚在github服务器上复制的仓库地址:

git for windows+TortoiseGit客户端的使用二

点击确定后就可以进行克隆。

git for windows+TortoiseGit客户端的使用二

然后进入本地仓库weixin中

查看版本分支图:

git for windows+TortoiseGit客户端的使用二

进行创建分支:

git for windows+TortoiseGit客户端的使用二

输入分支名称,并色选切换到新分支:

git for windows+TortoiseGit客户端的使用二

此时默认的header指向了dev分支:

git for windows+TortoiseGit客户端的使用二

修改git6.txt文件内容,添加一行内容:

git for windows+TortoiseGit客户端的使用二

提交本地dev分支中修改的文件:

git for windows+TortoiseGit客户端的使用二

git for windows+TortoiseGit客户端的使用二

切换到master分支:

git for windows+TortoiseGit客户端的使用二

git for windows+TortoiseGit客户端的使用二

切换到master分支后的git6.txt的内容,还是之前的没有新内容:

git for windows+TortoiseGit客户端的使用二

将dev和master进行合并:

git for windows+TortoiseGit客户端的使用二

git for windows+TortoiseGit客户端的使用二

git for windows+TortoiseGit客户端的使用二

合并好后,再次打开git6.txt内容就有新加的行了:

git for windows+TortoiseGit客户端的使用二

把合并好的内容提交到本地仓库master:

git for windows+TortoiseGit客户端的使用二

最后将本地仓库推送到github服务器仓库中:

git for windows+TortoiseGit客户端的使用二

git for windows+TortoiseGit客户端的使用二

使用https协议方式会提示输入用户名和密码:

git for windows+TortoiseGit客户端的使用二

git for windows+TortoiseGit客户端的使用二

git for windows+TortoiseGit客户端的使用二

在创建好新分支并和master分支进行合并好后的版本图:

git for windows+TortoiseGit客户端的使用二

在合并好后dev新分支就可以删除了:

git for windows+TortoiseGit客户端的使用二

git for windows+TortoiseGit客户端的使用二

git for windows+TortoiseGit客户端的使用二

删除完后,可以在版本分支图中看到dev新分支不存在了:

git for windows+TortoiseGit客户端的使用二

github之前仓库的的提交次数是:

git for windows+TortoiseGit客户端的使用二

提交后的是:

git for windows+TortoiseGit客户端的使用二