The previous four articles have covered how to get started with Git and its command operations. The author, as an expert in Git, has also done some tricks on Git. In this section, I will introduce some Tips on how to do tricks on Git

Fault report

Case problem

Git status = git status = git status = git status = git status = git status = git status = git status

Git config core.ignorecase false to be case sensitive

No stash, direct checkout

I wrote a lot of code in my branch. There was no commit and no Stash. I just checked out.

Resolve the conflict

When resolving the conflict, I left two lines of the same code. I didn’t know the reason for this bug for a day, so I had to compare the code line by line.

Push-f (Sad Face)

What a painful realization, my colleague once rebase the wrong branch, directly push -f on the master, so far I don’t know what this situation is.

rebase

Push f: Push f: Push f: Push f: Push f: Push f: Push f: Push F: Push F

fix bug

Change a bug, change it, change a lot of files, found hey, branch did not cut. Clutter up in front of the screen.

rm

Instead of entering git rm, go to rm -f. (Laughing and crying)

Ignore no configuration

It must have been a great time to submit a bunch of build files

reset

Git reset — hard if you don’t agree with it.

Tool post

There are many useful tools for Git: SourceTree, ohmyzsh

Want to write more lines for Ohmyzsh

With Ohmyzsh, you can go further and further down the road to death.

Git commit -a -m “message” : git commit -a -m “message”

For example, git status, input GST out, who knows who uses it, install a powerful tool, efficient bar.

In my previous article, my command line interface was different from the normal one because ohmyzsh was installed.

Official Address:

http://ohmyz.sh/

conclusion

Git series here to a temporary paragraph, most of the use of the scenarios can be covered, interested students can see the official documentation to continue to learn.

Welcome to join QQ group: 568863373.

Welcome to pay attention to our official account: Magic Capital three shuai, welcome everyone to contribute ~



Today I recommend a heavyweight! — Jia Jixin’s official account



Public account and microblog name: Han Jiang does not diao, people are also very cool, Android plug-in library nuwa developer, welcome to pay attention to his public account.