Tutorial on using sourcetree to operate git in Mac, sourcetreegit

Source: Internet
Author: User
Tags git commands sourcetree

Tutorial on using sourcetree to operate git in Mac, sourcetreegit


SourceTree is a free Git and Hg client under Windows and Mac OS X, and is also a tool for Mercurial and Subversion version control systems. Supports creation, cloning, submission, push, pull, and merge operations. SourceTree has a simple interface that greatly simplifies the Git operation between developers and code libraries, which is very practical for developers who are not familiar with Git commands. SourceTree has a complete Git function: You can use all the Git commands on a simple user interface to manage all the Git libraries with one click, either hosted or locally by one click, you can perform advanced functions such as commit, push, pull, and merge, such as patch processing, rebase, shelve, and cherry picking, you can connect to your code library hosted in Bitbucket, Stash, Microsoft TFS, or GitHub.

1. Installation of sourcetree:

Open the App Store: Search for sourcetree and download and install it (free of charge ).

2. Register a git Service (take http://git.oschina.net/as an example)

Open http://git.oschina.net/registration and verification, create a ticket forkproject and open it.


Record the git file address.

3. Open sourcetree and click new


Enter the address and select a local directory to store the code.

4. Now you can develop in the local directory. After the development is complete, open sourcetree again:


Drag files in the working tree into the index and click commit in the toolbar. in the pop-up box, Click commit again and click the green PUSH arrow, at this time, your file will be successfully uploaded to the git repository!

5. If error: failed to push some refs to error occurs, it is because the local version does not match the remote version. In this case, clone the code to the local computer again ~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.