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


$ git push --help
1597 questions
42 answers

How do I delete a Git branch locally and remotely?

Failed Attempts to Delete a Remote Branch: $ git branch -d remotes/origin/bugfix error: branch 'remotes/origin/bugfix' not found. $ git branch -d origin/bugfix error: branch 'origin/bugfix' not found. $ git branch -rd origin/bugfix Deleted remote…
Matthew Rankin
  • 439,004
  • 38
  • 121
  • 160
17 answers

How do I push a new local branch to a remote Git repository and track it too?

How do I: Create a local branch from another branch (via git branch or git checkout -b). Push the local branch to the remote repository (i.e. publish), but make it trackable so that git pull and git push will work.
Roni Yaniv
  • 54,946
  • 5
  • 18
  • 16
11 answers

How do you push a tag to a remote repository using Git?

I added a tag to the master branch on my machine: git tag mytag master How do I push this to the remote repository? Running git push gives the message: Everything up-to-date However, the remote repository does not contain my tag.
  • 113,096
  • 96
  • 299
  • 371
27 answers

Is there a way to cache https credentials for pushing commits?

I recently switched to synchronizing my repositories to https:// on GitHub (due to firewall issues), and it asks for a password every time. Is there a way to cache the credentials, instead of authenticating every time that git push?
  • 28,143
  • 4
  • 34
  • 50
29 answers

Git push requires username and password

I cloned a Git repository from my GitHub account to my PC. I want to work with both my PC and laptop, but with one GitHub account. When I try to push to or pull from GitHub using my PC, it requires a username and password, but not when I'm using…
  • 19,379
  • 6
  • 28
  • 44
12 answers

How do I properly force a Git push?

I've set up a remote non-bare "main" repo and cloned it to my computer. I made some local changes, updated my local repository, and pushed the changes back to my remote repo. Things were fine up to that point. Now, I had to change something in the…
  • 44,953
  • 23
  • 85
  • 125
5 answers

Warning: push.default is unset; its implicit value is changing in Git 2.0

I've been using Git for a while now and have recently downloaded an update only to find this warning message come up when I try to push. warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. To…
  • 70,457
  • 27
  • 121
  • 154
13 answers

Default behavior of "git push" without a branch specified

I use the following command to push to my remote branch: git push origin sandbox If I say git push origin does that push changes in my other branches too, or does it only update my current branch? I have three branches: master, production and…
  • 45,220
  • 33
  • 90
  • 99
31 answers

Git push error '[remote rejected] master -> master (branch is currently checked out)'

Yesterday, I posted a question on how to clone a Git repository from one of my machines to another, How can I 'git clone' from another machine?. I am now able to successfully clone a Git repository from my source ( to my destination…
  • 145,385
  • 43
  • 80
  • 95
5 answers

Force "git push" to overwrite remote files

I want to push my local files, and have them on a remote repo, without having to deal with merge conflicts. I just want my local version to have priority over the remote one. How can I do this with Git?
  • 57,792
  • 74
  • 241
  • 366
15 answers

What are the differences between "git commit" and "git push"?

In a Git tutorial I'm going through, git commit is used to store the changes you've made. What is git push used for then?
  • 28,459
  • 41
  • 124
  • 176
16 answers

Undoing a 'git push'

Here's what I did on my supposed-to-be-stable branch... % git rebase master First, rewinding head to replay your work on top of it... Fast-forwarded alpha-0.3.0 to master. % git status # On branch alpha-0.3.0 # Your branch is ahead of…
  • 8,269
  • 4
  • 19
  • 23
22 answers

Remote origin already exists on 'git push' to a new repository

I have my project on GitHub at some location, Now I want to push all my code to a new repository at some other location, I used the command: git remote add origin…
uzumaki naruto
  • 6,769
  • 3
  • 17
  • 12
66 answers

Git Push ERROR: Repository not found

I am having a very strange problem with git and github. When I try and push, I am getting: git push -u origin master ERROR: Repository not found. fatal: The remote end hung up unexpectedly I added the remote: git remote add origin…
  • 39,666
  • 72
  • 190
  • 280
6 answers

How do I push a local Git branch to master branch in the remote?

I have a branch called develop in my local repo, and I want to make sure that when I push it to origin it's merged with the origin/master. Currently, when I push it's added to a remote develop branch. How can I do this?
  • 24,134
  • 32
  • 102
  • 149
2 3
99 100