git use steps

Source: Internet
Author: User
Tags git clone

1, copy the address on the webpage git, git clone the project address, pull the file to the local.

2, Git branch fix_usb_bug//Build a branch of Fix_usb_bug, the name of the branch must be meaningful.

3, git checkout fix_usb_bug//switch to Fix_usb_bug Branch, project development on this branch.

4, the development process is sure to modify the code, I test to confirm that there is no problem after

5, Git add modified/Added file//git Add. Add all the modified files

6. Git commit//Add modification description

The next steps are as follows:

$git Checkout master//Toggle Local Master

$git Fetch Origin Master//drop-down server latest code

$git Merge Origin/master//merge the latest server code into master, Origin/master is a fixed name

$git checkout Fix_usb_bug//Switch to Fix_usb_bug Branch, our modifications are made in the Fix_usb_bug branch.

$git rebase Master//Fix_usb_bug branch to the master branch, the result is that the change of Master branch is fused into Fix_usb_bug

$ git checkout master//switch to local master

$ gitmerge fix_usb_bug//merge the changes of the Fix_usb_bug branch into the master branch, and the result is that the change of the Fix_usb_bug branch is fused into master

$ gitpush Origin head:refs/for/master//upload change to server awaiting review, submit Master Branch


Sometimes graphical tools are more likely to show changes in historical submissions, and GITK, which is released with Git, is one such tool. It's written in TCL/TK, basically the visual version of the git log command, and the options that git log can use are also available on GITK. When you enter the GITK command in the Project working directory, the interface is launched.

What we usually use is the GITK image interface.




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.