While migrating all my repos to GIT i found myself discovering new ways of work with git, i’ll try to past them on this blog as own notes.
Need: A list of changed files on my <branch> comparing to master
git branch <your branch> // Switch to branch git pull origin master // Sync master changes inside your branch git diff --name-only master <branch> // List of the changed files
Probably there is a nicer way to achieve this, let me know if you find any other
If you are on the branch you wish to compare with master you don’t need the name of your current branch. You can just do:
git diff –name-only master
That way you can also create an alias for it easily:
git config –global alias.diffm “diff –name-only master”
And now the command is:
git diffm
And the comment system apparently has a bug, so double dashes (- and another -), only appears as a single -.
So in order to make the above work, these start with two dashes:
–name-only
–global
Being passionate about your topic usually reflects in the quality of what you post and this is something readers enjoy and appreciate. Many couples dream of the day when their children are out of the house, so that they can buy an RV and travel the country.