As a beginner of using Git, I want to keep it simple and don't want to study deeply into it.
2 days of study and research on Git is enough for me.
Most Useful Command
I find that, below command is the most useful and can help me to do the version control perfectly in most of the time.
That's it. No more complex things is needed.
However, the next question is, if I every time type all those command again and again, it is quite annoying…
Can we do better?
Sure we can!!
Shortcut of Git Command
In bash shell, there are something called "alias" which can define our own short cut.
As I am using SourceTree for Git client and it is embedded Git, so I can't directly add alias on Git bash shell.
However, there are another way to define it through bash.bashrc .
For SourceTree, it is on C:\User\xxxx\AppData\Local\Atlassian\SourceTree\git_local\etc
Then , just add below code. For the details, please go the link on reference.
That is very powerful ,effective and easy to remember!
You can set anything you want.
Perfect!!
Test some command
gs
greset
All Works like a charm!!
Conclusion
From now on, I just need to memorize gaa, gcm,gb,gclean,greset,gco
That's really makes things more simple!!
Good.
Reference:
Good reference for command shortcut
[1] https://jonsuh.com/blog/git-command-line-shortcuts/
沒有留言:
發佈留言