Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I see what changes have been made in a git repository without pulling it into my working tree

Tags:

git

For example, I could just git pull and then git checkout HEAD-1. But is there a way of seeing the differences before deciding whether to git pull or not?


1 Answers

Do a git fetch first to update your remote tracking branch. Then use git log ..origin to see what has changed in the "origin" branch. Then you can do a git pull if you are satisfied with the changes.

like image 186
Greg Hewgill Avatar answered Jan 24 '26 17:01

Greg Hewgill



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!