Questions tagged [push]

In distributed version control, push is the action of sending local changes to a remote repository.

5455 questions
207
votes
2 answers

What does the -u flag mean in git push -u origin master?

I was just wondering what does the -u flag mean in this command? git push -u origin master
user123456
  • 2,287
  • 3
  • 13
  • 10
196
votes
2 answers

git how to disable push

I am using git and I am doing my development work, which I don't want to push, even by mistake. Is there a method to disable push in certain local repository. One method is to rename the branch, another is to undo push if one does it by mistake, but…
user984260
  • 3,401
  • 5
  • 25
  • 38
192
votes
6 answers

"Updates were rejected because the tag already exists" when attempting to push in SourceTree

When attempting to Push via Source Tree, I get the following error: git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags origin refs/heads/master:refs/heads/master Pushing to…
Senseful
  • 86,719
  • 67
  • 308
  • 465
190
votes
9 answers

Git - Ignore files during merge

I have a repo called myrepo on the remote beanstalk server. I cloned it to my local machine. Created two additional branches: staging and dev. Pushed these branches to remote as well. Now: local remote server …
Kevin Rave
  • 13,876
  • 35
  • 109
  • 173
189
votes
14 answers

How to add multiple files to Git at the same time

This will be my first git use. I have added new files ( a lot ) to the folder/project ( git local repository). I went through online tutorials and forums and see i can do git commit -a So I go to the base folder of the repository and do a sudo git…
kishore .
  • 2,123
  • 2
  • 16
  • 12
180
votes
4 answers

git push to specific branch

Even after reading this question: git-push-current-branch, I am still having difficulty figuring out how I should write my git push command. As mentioned in the question link, it's not clear from the documentation. I would like to use my 'real…
code_fodder
  • 15,263
  • 17
  • 90
  • 167
158
votes
21 answers

Git push rejected "non-fast-forward"

I am fairly new to git, yet currently using it to manage our code in a team environment. I had some rebasing issues, and I fixed them using: git checkout --ours filename.txt git add filename.txt git rebase --continue Now I wish to push my changes,…
Frankline
  • 40,277
  • 8
  • 44
  • 75
158
votes
7 answers

git - Your branch is ahead of 'origin/master' by 1 commit

I am newbie in git and I am working on git. I added some files in git : git add git add then I wanted to push that for review, but mistakenly I did git commit so the files which I have changed don't go for reviews. Now if I…
sam
  • 18,509
  • 24
  • 83
  • 116
156
votes
9 answers

Git: add vs push vs commit

What is the difference between git add, push and commit? Just a little confused coming from SVN, where "update" will 'add' stuff, and commit does a "push" and will 'add' as well There are all different functions within git. Hoping for some…
CQM
  • 42,592
  • 75
  • 224
  • 366
146
votes
6 answers

fatal: The upstream branch of your current branch does not match the name of your current branch

After doing a checkout of the remote branch releases/rel_5.4.1 using the Git GUI, I'm seeing this unexpected error message when I try to push: fatal: The upstream branch of your current branch does not match the name of your current branch. To push…
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
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
133
votes
15 answers

Git Push into Production (FTP)

I would like to know if there is an easy way to push a GIT repository into production (on a FTP server) ? Thanks
Roch
  • 21,741
  • 29
  • 77
  • 120
122
votes
10 answers

Difference between array_push() and $array[] =

In the PHP manual, (array_push) says.. If you use array_push() to add one element to the array it's better to use $array[] = because in that way there is no overhead of calling a function. For example : $arr = array(); array_push($arr,…
l2aelba
  • 21,591
  • 22
  • 102
  • 138
120
votes
7 answers

Adaptive segue in storyboard Xcode 6. Is push deprecated?

Xcode 6 interface builder by default has new checkbox "use size classes". It makes views adaptive. When I try to make segue between 2 views in my storyboard I have new options: instead old: Now we have "show" and "present modally" instead of…
John Kakon
  • 2,531
  • 4
  • 24
  • 28
119
votes
3 answers

Can anybody push to my project on github?

I set up a repository on GitHub, and I can push local stuff to this remote repository. Can anybody change my repository on GitHub freely? Or if I push something to Linux kernel, are the changes I made added to it and public for all?
Silvery
  • 1,358
  • 2
  • 8
  • 8