![]() ![]() One of the best examples of this is references to remote branches that have already been deleted. ![]() Prune/Cleanup the local references to remote branch The command git remote prune origin -dry-run lists branches that can be deleted/pruned on your local. One of the better things about Git is that it’s cautious about deleting data, making it pretty hard to lose commits or valuable data in git A tiny downside of this is that you sometimes see stale data that you don’t need anymore. It is possible to defeat this as well (using manipulation), but you're probably better off just being disciplined enough to not create or modify master locally. List branches in local machine The command git branch -a shows the test branch feature-collaboration is present on local and also present on remote 2. To delete your remote-tracking branch locally using the command line interface: git branch -d -r origin/masterīut again, it will just come back on re-synchronizations. ![]() You can do this by deleting the remote-tracking branch locally, but it will simply come back every time you ask your git to synchronize your local repository with the remote repository, because your git asks their git "what branches do you have" and it says "I have master" so your git (re)creates origin/master for you, so that your repository has what theirs has. Apakah Kalian sedang mencari artikel seputar Git Remove Local And Remote Branch namun belum ketemu Tepat sekali untuk kesempatan kali ini penulis web akan membahas artikel, dokumen ataupun file tentang Git Remove Local And Remote Branch yang sedang kamu cari saat ini dengan lebih baik. I think (based on your comments) that I understand what you want to do: you want your local copy of the repository to have neither the ordinary local branch master, nor the remote-tracking branch origin/master, even though the repository you cloned-the github one-has a local branch master that you do not want deleted from the github version. To delete branches, take a look at this post on branch deletion. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |