git branches merge, revocation; git commit message has been modified to push; git undo operations;

git branch merge

1, branch code submission

2, git branch local branch inquiry

3, git checkout branch name selection branch to the branch to be merged 

4, git merge branch 2 // Select the name to be merged into the branch name branch name 1 of 2

eg: if develop_screen develop branch into the branch, this time to develop the switching branch, git merge develop_screen

5, there may be a conflict after the merger, the code can be used git status to see conflict  

After <<<<<<< ======= >>>>>>> Identification Code of conflict, modify, add, add submitted commit

6, git push // push to

https://git-scm.com/book/zh/v2/Git- branch - merged with the new branch

https://www.jianshu.com/p/76c351901aca

Undo git merge

Prior to Git version of recovery are two ways to reset, revert (Detailed graphics)

After experiencing conflict or error un-merge merge Git

 

git commit modify information already push the

Shall apply to modify the latest commit information has been push to ensure that local file is up to date.

Use git commit --amend command (modify the comment the most recent information submitted), will enter the vim editor

Edit submitted information, save and exit (vim command)

git push -f to force submission

Then you can see the information that has been modified on the server git

Original: https://www.cnblogs.com/winstonet/p/9964692.html

 

git undo

  Git- basis - undo actions

 

Guess you like

Origin www.cnblogs.com/lulushen/p/11491405.html