You want to rename a Git branch because of a typo or for any other reason? What if you already have pushed to the origin?
In this article we check the available Git commands to achieve these tasks.
Read the complete articleYou want to rename a Git branch because of a typo or for any other reason? What if you already have pushed to the origin?
In this article we check the available Git commands to achieve these tasks.
Read the complete articleOver time, branches accumulate, they get merged, abandoned, or deleted remotely but still present locally.
Short on time? Here’s the TL;DR:
git fetch --prune # Sync + remove deleted remote branches
git branch -vv # Find stale branches ([gone])
git branch -d branch_name # Delete them safely
A Git submodule lets you include another repository inside your own project. This is useful for reusing shared code, libraries, or dependencies across multiple projects.
To add a submodule to your parent repository, follow these steps:
Read the complete articleConsider the following scenario. Multiple developers work on one feature branch of a project. Developer A pushes commits into the feature branch, developer B oversees that his local repository is behind origin, force pushes his commits and as a result overwrites the commits from Developer A. Developer A pulls the changes and his commits are now gone. Can Developer’s A missing commits be restored and how?
Read the complete articleThe scenario described on the title of the article happens pretty often. You committed files, pushed them to a feature branch and created a new pull request to merge them to master. However, maybe you accidentally pushed modified files, for which work is still in progress and you do not want them on master yet. So now you want to remove specific files from the pull request but keep the changes you made in these files locally. How?
Read the complete articleA concise reference of my most-used Git commands. Updated on March 2026.
Read the complete articleIn order to download and use a remote repository, which is stored in Azure DevOps, do the following two steps and you are good to go.
Read the complete articleIf you want to store your source code in a repository that uses Git, you often have to create a .gitignore file which contains a black list of files that should not be committed to the repository. If now you are using Visual Studio for your projects the need for such a file is even bigger since this IDE creates a number of files (.exe, build, bin folders, etc.) that are only needed on your local machine.
With the release of Visual Studio for Mac we need to create a .gitignore file for our Visual Studio projects by using our Mac.