Created
March 21, 2011 23:08
-
-
Save nzakas/880432 to your computer and use it in GitHub Desktop.
Get updates list before merging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I was trying to figure out how to get a list of changes made remotely on Git | |
# before applying. Here's what I came up with. | |
# First, get the latest data from the origin | |
git fetch origin | |
# Then, get the changes and output to a file | |
git log HEAD..origin/master > changes.txt | |
# Merge changes in | |
git merge origin/master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is part of a CI script I'm writing. The basic idea is that I only want to do a new build if there have been changes. I use the changelog to determine if there have been changes, so:
Seems to be working so far.