Diff Before following this post, make sure you have already set up everything from my other post regarding the configuration of the git environment. Diff command will allow you to compare two different commits, let’s set up a repository:
|
mkdir repos1 mkdir repos2 mkdir remote_repose cd repos1 git init git init --bare ../remote_repose/ git remote add origin ../remote_repose/ touch A.txt git add -A git commit -a -m 'A Added' git push --set-upstream origin master |
Now in the second repository, we make some changes:
|
cd ../repos2/ git clone ../remote_repose/ . touch B.txt date > A.txt git add -A git commit -m 'some changes' git push |
now let’s back to the first repository and see …
Mastering git, Part 4, git merge, git diff with GUI tools, view git history (commit log), blame Read More »