There are situations, you are so hurry and have committed few changes without switching to your current branch. And if you need to move those commit to your branch, below steps are useful. Continue reading
Sometimes you need to stage all the changes like addition of new files, deletion of files and modification as a whole instead of adding/removing one by one using git add/git rm, then use the following command.
# git add -A
In Linux environment, sometimes you need to find the connected or connected state of Ethernet cable . There are few solutions,using ‘ifconfig’ and Ping a host . But this may not be helpful when network is configured properly. In such a case, the results of this commands are not valid. So in such a case we can use below steps to detect the state of Ethernet cable.
The Linux kernel version of source tree can be found out running below command from kernel source directory.
As a developer you often need to create a patch file, when working between codes.Below are the few methods to create patch file.
1.Using diff command
Below command creates patch between two copies of code in current directories.
diff -Naur subdir1 subdir2 > patch.txt
By using git, we can create path in different ways.
a)This one creates patch for the last commit
git show > mypatch.txt
b)This command creats patch for current changes in git repository.
git diff > mypatch.txt
c)This command creats patch between two commits in git.
git diff <commitid1> <commitid2> > mypatch.txt