GIT diff giving me different feedback than git merge -
when run
git diff fetch_head it lists load of expected changes, since fetched updated version remote.
but....
when run
git merge fetch_head it tells me date!!
where going wrong?
why fetch_head different head, after merge?
a merge creates new commit, containing changes original head, orig_head , fetch_head. means if original head contained changes not contained in fetch_head, new (merged) head different fetch_head since contains commits well.
thing check
it's possible current branch up-to-date fetch_head previous fetch, above reason, or reason.
to check this, sha (hex number) fetch head follows:
git log -1 fetch_head commit bec5aadef68a5d29c9d523358a0189b86cad4c82 author: alex brown <alex@xxx> date: tue nov 16 10:05:19 2010 +0000 weather report and copy first 6 digits of fetch_head: bec5aa
next, search sha in ancestry of head
git log head | grep "commit bec5aa" -a 5 commit bec5aadef68a5d29c9d523358a0189b86cad4c82 author: alex brown <alex@xxx> date: tue nov 16 10:05:19 2010 +0000 weather report if returns blank, fetch_head has been merged. differences see in current head, may merged head (or descendant).
*example demonstrate this"
cd /tmp mkdir 1 cd 1 git init echo "woo" > a.txt git add a.txt git commit -m "first commit" cd .. git clone 1 2 cd 1 echo "its nice today" >> a.txt git commit -a -m "weather report" cd .. ls cd 2 ls echo "like peas in pod" > b.txt git add b.txt git commit -m "sayings" git fetch git diff fetch_head git merge fetch_head git diff fetch_head
Comments
Post a Comment