![]() |
Ever tried to `git pull` or `git push` and hit a roadblock with the message “There is no tracking information for the current branch“? This means your local branch isn’t connected to a corresponding branch on the remote server. Don’t worry, this article will help you fix it in two ways. Table of Content What is the ProblemImagine your local branch is an island, and the remote branch is the mainland. Without a connection (tracking information), you can’t easily share your changes between them. The “There is no tracking information for the current branch.” error occurs when you run The recommended solution is to set up tracking so that Git automatically knows which remote branch to pull from when you run When you apply the quick fix, it modifies the
Link Your Local Branch to an Existing Remote Branch (if you know its name)
git branch
![]() see remote branches using ‘ git remote show origin ‘
git branch --set-upstream-to=origin/<remote_branch>
![]() used ‘ git fetch ‘ before run given command for properly fetched remote branches Push Your Local Branch and Create a Remote Branch (if it doesn’t exist)
git push -u origin <local_branch>
![]() successfully created new remote branch Remember
Now you should be able to `git pull` and `git push` smoothly! |
Reffered: https://www.geeksforgeeks.org
Git |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 15 |