Questions tagged [git-push]

Pushes the changes from a local Git repo to remote

git push is used to push the data and branch changes from your local Git repository to remote.

Popular questions

See also

References

$ git push --help
1705 questions
246
votes
14 answers

Git Push error: refusing to update checked out branch

I have solved some merge conflicts, committed then tried to Push my changes and received the following error: c:\Program Files (x86)\Git\bin\git.exe push --recurse-submodules=check "origin" master:master Done remote: error: refusing to update…
Funky
  • 12,890
  • 35
  • 106
  • 161
236
votes
13 answers

How can I find the location of origin/master in git, and how do I change it?

I'm a Git newbie. I recently moved a Rails project from Subversion to Git. I followed the tutorial here: http://www.simplisticcomplexity.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-a-git-repository/ I am also using unfuddle.com to…
Brian Kelly
  • 5,564
  • 4
  • 27
  • 31
218
votes
6 answers

Git: which is the default configured remote for branch?

I have a remote bare repository hub. I work only in the master branch. The last sentence of this error message below makes me wonder: How do I find out which is the "default configured remote for your current branch"? And how do I set…
leonbloy
  • 73,180
  • 20
  • 142
  • 190
217
votes
4 answers

How do you push a Git tag to a branch using a refspec?

I want to force push, for example, my tag 1.0.0 to my remote master branch. I'm now doing the following: git push production +1.0.0:master I want to force the push, because all I care about is that the code inside the 1.0.0 tag is pushed to the…
Michael van Rooijen
  • 6,683
  • 5
  • 37
  • 33
176
votes
37 answers

Git push hangs when pushing to Github?

Git push hangs everytime I try to push to github. I am using Cygwin and Windows 7. Git functions fine locally tracking branches, providing status, setting global user.name and user.email and allowing commits. I'm still new and learning. I enter git…
Matt Singer
  • 1,917
  • 2
  • 14
  • 12
170
votes
5 answers

How to push to a non-bare Git repository?

I usually work on a remote server via ssh (screen and vim), where I have a Git repository. Sometimes I'm not online, so I have a separate repository (cloned from my remote) on my laptop. However, I can't pull from this repository on remote side…
woky
  • 4,686
  • 9
  • 36
  • 44
166
votes
30 answers

git pushes with wrong user from terminal

I have an issue with git and my terminal. Here's a gallery to show you my issue. When I push commits from my terminal, git says I push them with another username, that's a user from my organization (my company) with no commit at all and it seems it…
Yinfei
  • 1,943
  • 2
  • 12
  • 13
164
votes
2 answers

What does git push origin HEAD mean?

I found, in the official guide: git push origin HEAD A handy way to push the current branch to the same name on the remote. However, the meaning of the command is not clear to me. Why does it have this effect? I haven't been able to find an answer…
0x5C91
  • 3,360
  • 3
  • 31
  • 46
159
votes
26 answers

! [rejected] master -> master (fetch first)

Is there a good way to explain how to resolve "! [rejected] master -> master (fetch first)'" in Git? When I use this command $ git push origin master it display an error message. ! [rejected] master -> master (fetch first) error: failed to…
Symfony
  • 2,289
  • 6
  • 23
  • 30
153
votes
6 answers

Git push branch from one remote to another?

I have the following remotes set up: $ git remote korg rorg And the following branches: $ git branch -a * (no branch) remotes/korg/gingerbread remotes/korg/gingerbread-release remotes/korg/honeycomb remotes/korg/honeycomb-mr1-release …
Bjarke Freund-Hansen
  • 28,728
  • 25
  • 92
  • 135
150
votes
2 answers

"simple" vs "current" push.default in git for decentralized workflow

Functionally speaking, in a decentralized workflow, I don't see the difference between simple and current options for push.default config setting. current will push the current branch to an identically named branch on the specified remote. simple…
void.pointer
  • 24,859
  • 31
  • 132
  • 243
149
votes
14 answers

Issue pushing new code in Github

I created a new repository on Github which has only Readme.md file now. I have a newly created RoR project which I wanted to push to this repository. Following are the commands I gave in my Terminal to execute this along with the error I am…
Aniruddha
  • 3,157
  • 4
  • 32
  • 48
136
votes
12 answers

fatal: 'origin' does not appear to be a git repository

I've a repository moodle on my Github account which I forked from the official repository. I then cloned it on my local machine. It worked fine. I created several branches (under the master branch). I made several commits and it worked fine. I…
xan
  • 4,640
  • 13
  • 50
  • 83
131
votes
10 answers

Cannot push to Heroku because key fingerprint

I am new to Rails, and I was trying to deploy a very simple app to Heroku. This is the second app that I deploy, and the first one I was able to do it just fine. However I am having some issues with this one. Whenever I "git push heroku master", I…
mre
  • 1,393
  • 2
  • 10
  • 7
128
votes
7 answers

Making a Git push from a detached head

I am on a detached head and made some changes. I want to push up these changed to this detached head with Git. I do not want my changes to go onto the develop branch and certainly not on the master branch. I am working on a file with another…
Winnemucca
  • 3,309
  • 11
  • 37
  • 66