Skip to main content

Git: The Current Branch is not Configured for Pull




Fixing the Git Error:  The Current Branch is not Configured for Pull


Are you trying to perform a git pull from a remote git repo within Eclipse?  Does the pull request work for your master branch but not on other branches?


Are you seeing an error message like below:



The current branch is not configured for pull
No value for key branch.develop.merge found in configuration


Or an error message such as the following:

The current branch is not configured for pullNo value for key remote.origin.url found in configuration



The current branch is not configured for pull. No value for key branch.develop.merge found in configuration.
Error message trying to pull from a remote git branch


Most likely, you created the branch locally and you haven't set the merge section of that branch and/or your local branch is not tracking the remote branch.  The problem lies in your git local configuration.

There are many ways to fix this but the most straightforward for me is the following:


Open up your Git Bash:

Location of git Bash command prompt
Open your git bash from the Start Menu


Right-click your project and click properties.  Get the location of your project in git.

Finding the location of your local project
Find the local git repo location of your project in your IDE



Go to your git prompt:


Your git bash command prompt
Git Bash command prompt


Change your directory to your project's directory.  Be sure to use forward slashes!

cd C:/Users/your-username/git/your-path

Checkout the branch


git checkout branchname

 Then push the local branch to your remote branch using the -u flag.  This will setup your pull settings automatically.


git push -u origin branchname


This should automatically update your local configuration and you should now be able to execute a git pull command for that branch from the remote repo.




Alternatively, you can modify the config directly

C:\Users\yourusername\git\yourprojectname\.git\config

Then add the following entry for your branch.


[branch "master"]
remote = origin
merge = refs/heads/master



--
APNSG5FMT284 Software Development Blogs - BlogCatalog Blog Directory

Popular posts from this blog

Change Port on a Spring Boot Application when using intelliJ

Change Port on a Spring Boot Application when using intelliJ  Two ways to change the port that the embedded Tomcat is using in a Spring Boot Application. The first way is to modify the application properties in the resources folder: Update application props in Spring Boot Application There are a couple issues with this approach.  You might only want this port change in your local environment and if you check it in by accident you might break things. Alternatively, you can use a command line parameter. Go to Run -> Edit Configurations -> VM options Then enter in the following argument: -Dserver.port=8090 Then click apply and OK and attempt to run the application again. Update port using VM option

How to set up a SQL Server 2008 Local Database

Setting up and Configuring your Microsoft SQL Server 2008 Local Database Download SQL Server Download SQL Server Express.  Express is the Free edition of MS SQL Server http://www.microsoft.com/en-us/download/details.aspx?id=1695 Install your SQL Server Instance Click the Start button -> Click Microsoft SQL Server 2008 -> Click Configuration Tools -> Select SQL Server Installation Center Select Installation -> Select New SQL Server stand-alone installation Select SQL Server stand-alone installation Get your Local SQL Server Service Up and Running Open up the SQL Server Configuration Manager Click the Start button -> Click Microsoft SQL Server 2008 -> Click Configuration Tools -> Select SQL Server Configuration Manager Setup SQL Server Config Manager Start up the SQL Services You want to ensure the following services are in the "Running" State and then you want to set the following services to automatic St...

Building Microservices with JHipster

Check out this article on Medium and LinkedIn Pulse, for a brief overview of microservices as a primer for working with JHipster to build web applications with a Microservices backend. Building microservices with Jhipster JHipster is sponsored by Ippon Technologies(https://www.ippon.tech/). Need cost-effective fractional engineering with US expertise? Fintech and Blockchain Specialized Fractional Engineering