I’m using Git for an ASP.net site.
I push changes to the repo.
Then I go to the server, fetch from repo and merge local.
–> Now, I just want to copy the files that have changed over to my Inetpub folder.
Is there an easy way to do this with a Git Bash command?
Gives you the files that were changed in the latest commit in a one-file-per-line list. HEAD can be replaced by any git treeish, such as a commit sha1 or HEAD^ for the parent of the latest commit, etc.
You directly use this to copy files by piping it to
xargsandcopyusing either the -J or -I switch for OS X and linux respectively: