git diff --name-only tag..master
This command is useful if you want to cancel your last n commits and conserve all the modifications.
git reset --soft HEAD~n
git reset --merge ORIG_HEAD
n is the number of commit to reset.
Useful commands you use for creating a patch for clients.
git diff --name-only tag..master | xargs zip name.zip
This command will make a zip file from the diff.
If you want to delete a part of the path you have to do this:
git diff --name-only tag..master | sed "s/project\///" | xargs zip name.zip
project is the part of the path you want to delete.
git checkout -b branch_name
git checkout branch_name
git merge branch_name
This command will merge branch_name into your current branch. For exemple, if you are on the master, this will merge the selected branch into master.
git branch -d branch_name
git branch -D branch_name
git push origin :branch_name
git tag tag_name
git push origin tag_name
git tag -d tag_name
git push origin :tag_name