• 欢迎来到本站,本站主要做程序员相关技术、博客、笔记,如果喜欢本网站那么赶紧使用Ctrl+D 收藏吧!
  • 如果有任何疑问,可以在下方文章下方留下你的评论~

Git GUI – Sourcetree is a free git GUI tool for Version Control System and how to use it?

赚钱副业 8个月前 (10-10) 4次浏览 0个评论

First download and install sourcetree from the official website, and then run sourcetree directly.

When you first run sourcetree, sourcetree doesn’t know where the Git library is. If there is already a git library locally, drag the folder directly from the resource manager to the sourcetree to add a local git library:

Git GUI - Sourcetree is a free git GUI tool for Version Control System and how to use it?

Git Commit

You should double-click the local library learngit, and the source tree will open another window to show the current branches and file status of the GIT library.
Select "WORKSPACE"-"File status" in the left panel, and the currently modified files (unstaged files) will be listed on the right side:

Git GUI - Sourcetree is a free git GUI tool for Version Control System and how to use it?

Select a file and the file will be automatically added to "staged files". In fact, the git add README.md command is executed.

Git GUI - Sourcetree is a free git GUI tool for Version Control System and how to use it?

Then, you can enter the commit description below and click "commit" to complete a local commit:

Git GUI - Sourcetree is a free git GUI tool for Version Control System and how to use it?

The git commit -m "update README.md" command is actually executed.

branch

In the left panel, BRANCHES,it lists all branches of the current local library.The current branch is bold and marked with a .

If you want to switch branches, just select the branch, such as master, and then right-click to select "Checkout master" in the pop-up menu.

It actually executes the command git checkout master:

Git GUI - Sourcetree is a free git GUI tool for Version Control System and how to use it?

If you want to merge branches, select the branches to be merged, such as dev, right-click and select "Merge dev into master" in the pop-up menu.

It actually executes the command git merge dev:

Git GUI - Sourcetree is a free git GUI tool for Version Control System and how to use it?

git pull and git push

On the toolbar of SourceTree, there are pull and push respectively, corresponding to git pull and git push respectively. You need to note that the names of local and remote branches should be corresponding, which is very simple to use.

If the operation fails, SourceTree will automatically display the GIT command executed and the error message:

Git GUI - Sourcetree is a free git GUI tool for Version Control System and how to use it?

YouTube – How to Use Sourcetree for Git Version Control System


中国笔友, 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Git GUI – Sourcetree is a free git GUI tool for Version Control System and how to use it?
喜欢 (0)
发表我的评论
取消评论
表情 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址