![]() ![]() ![]() If you're new to using pull requests and just want to see what steps you should follow, here's my git pull request checklist which you may find helpful. What if you want to keep the branch around so you can always go back and see when it was merged? We'll get to that at the end of this post. You can create another branch, and even give it the same name, but don't recycle branches you've already associated with a pull request for use with any other work. Reusing the patch-1 branch (after its original PR has been merged and closed) is a good way to cause problems in your git repository. At this point, the pull request is complete, and future commits should only be made on master, not patch-1. After the merge (assuming a new merge commit is added), both master and patch-1 point to a new merge commit. In the Delete branch dialog box, select Delete. In the options menu, select Delete branch. Select the More options button at the end of the row of the branch you want to delete. Before the merge, master and patch-1 both point to separate commits in git's commit history. Command Line View your repo's branches by selecting Repos > Branches while viewing your repo on the web. Consider a scenario in which a branch patch-1 is about to be merged with the master branch through a pull request. They don't add any significant technical overhead, but they make it more difficult for humans to work with lists of branches in the repository.īranches can be safely removed without risk of losing any changes. In most cases, branches, especially branches that were related to a pull request that has since been accepted, serve no purpose. Why should you delete old branches from your git repositories? There are two main reasons: It's a common housekeeping practice to delete git branches once they're no longer used, but this practice isn't necessarily universal, or universally understood. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |