![]() ![]() If you use Visual Studio there is a much better way to review PR directly in your IDE by using the Microsoft Extension Pull Requests for Visual Studio.You can then directly checkout the PR number you want to review.You only need to do the git config command once and each fetch will also fetch the PR.Doing this command from time to time will allow you to benefit from git last version with new features and corrected issuesĬheckout a PR when using Azure Repos git config -add +refs/pull/*/merge:refs/remotes/origin/pr/*.Sometimes, once Git is installed, we forget to update it.Update git when using Windows git update-git-for-windows When you want to move an existing branch to another commit When you want to "remove" the last commit When you want to reset a file to its previous version See this Stackoverflow post for more information.All your local changes will be erased, if you want to keep them use -soft.Here we can see that the myFriendlyStashName is the first one and we can pop it with git stash pop or apply it with git stash apply someone did a git push -force on the repository and you want to reset your local repository git fetch When you list all you current stash later with git stash list, you can easily find its number: Git stash save "myFriendlyStashName" will save your local changes in a stash with the name "myFriendlyStashName" When you want to stash your local changes with a specific name you can easily find later Check this post to deep dive into interactive rebase.Opens up an editor to pick, reword, edit, squash or fixup your last 3 commits.When you want to have a clean commit history on your branch before creating your pull request git rebase -i HEAD~3 ![]() And as most of the time you don't need to and want to stay on your feature branch, that's easier and quicker to do it this way. It does the same thing than the previous set of commands, but just does not merge the changes of dev on your local dev branch.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |