Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Ways to undo wrong Git operations

While using Git to version code, programmers would inevitably perform some invalid operations which are not expected. Sometimes it's difficult to deal with this kind of awkward situations. If the programmer chooses to undo the operation, the programmer needs to bear the risk of deleting something which is not supposed to be deleted if the undo is done improperly. If the programmer leaves it as is, the file needs to be updated again manually with a new commit. In this post, we will try to provide advice on how to properly undo wrong operations performed using Git for some scenarios. G...

3,088 0       GIT RESET GIT COMMIT GIT


  Frequently used Git commands

Git configurationgit config --global user.name "robbin" git config --global user.email "fankai@gmail.com"git config --global color.ui truegit config --global alias.co checkoutgit config --global alias.ci commitgit config --global alias.st statusgit config --global alias.br branchgit config --global core.editor "mate -w" # Configure Editor to use textmategit config -l #List all configurationsUser's git configuration file : ~/.gitconfigFrequently used Git commandsCheck、add、push、delete、find,reset filegit help # Show help of commandgit show # Show th...

6,321 0       COMMAND GIT


  Understand diff in Unix

diff is an important tool program in Unix. It is used to compare differences of two files, it is the foundation for code version control. If you type :$ diff <file_before_change> <file_after_change>diff will tell you what's the difference between these two files. The result may not be so easy to understand, so now I will show you how to understand diff.1. 3 formats of diffdiff has 3 formats due to historic reasons.normal diffcontext diffunified diff2. Demo filesFor easy demonstration, we create 2 demo files.The first one is f1, it has 7 lines of a in it.aaaaaaaThe second file is f2...

12,232 0       UNIX DIFF VERSION CONTROL GIT