Android Studio and Git Branches
We can also use shortcut ctrl + v (Mac) and then 7 and start typing. What can you do to avoid typing a lot?
You can add bulk mobile numbers database free branches to favourites, clicking on a star and limiting the number of displayed branches using Show Only Favorites.
Well, our branches are still there and we don’t need them anymore.
Get rid of them
Let’s go to the terminal. You probably have remote branches that are actually deleted from a remote repository. How to remove them:
git remote prune origin
view rawpruneRemote.sh hosted with by GitHub
Optionally we can use a --dry-run flag to check what will be pruned before we do it.
git remote prune origin --dry-run
view rawpruneDryRun.sh hosted with by GitHub
You can also remove any local branch that has already been merged into the develop or master.
git branch --merged | grep -E -v "master|develop" | xargs git branch -d
view rawdeleteMerged.sh hosted with by GitHub
Use aliases
Well, why use the mouse?
-
- Posts: 23
- Joined: Mon Dec 23, 2024 3:40 am