Questions tagged [push]

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

5455 questions
115
votes
23 answers

Declare an empty two-dimensional array in Javascript?

I want to create a two dimensional array in Javascript where I'm going to store coordinates (x,y). I don't know yet how many pairs of coordinates I will have because they will be dynamically generated by user input. Example of pre-defined 2d…
Zannix
  • 1,473
  • 3
  • 16
  • 26
111
votes
3 answers

Warning on "diff.renamelimit variable" when doing git push

I'm pushing the local commit to the remote git server and got the following warning messages: remote: warning: only found copies from modified paths due to too many files. remote: warning: you may want to set your diff.renamelimit variable to at…
stid.smth
  • 1,525
  • 2
  • 11
  • 11
109
votes
4 answers

Git: Pulling a rebased branch

Let me describe my situation: Mr Blond and Mr Orange are working on branch A that branches out of the master branch on commit M1. Branch A has 2 commits: A1 and A2. M1 \ \ A1 - A2 Meanwhile, Mr Orange committed and pushed 2 more…
Itai Hanski
  • 8,540
  • 5
  • 45
  • 65
105
votes
12 answers

Git push failed, "Non-fast forward updates were rejected"

I've edited my GIT repositories via Git Online. After I tried to push my local code changes, I got an error: Git push failed, To prevent from losing history, non-fast forward updates were rejected. How can I fix this?
Sarath
  • 9,030
  • 11
  • 51
  • 84
102
votes
3 answers

git push: Push all commits except the last one

Is there a way to push all my local commits to the remote repository except the most recent one? I'd like to keep the last one locally just in case I need to do an amend.
python dude
  • 7,980
  • 11
  • 40
  • 53
101
votes
3 answers

Push git changes to a shared network drive

How can a team of four people use Git (specifically Github for Windows) to push local changes to a shared network drive? Right now (without Git) we have to copy the files from the network drive to our local machine, edit the files, and then…
user1549303
  • 1,019
  • 2
  • 8
  • 3
100
votes
4 answers

How to combine group of local commits to single push in IDEA?

In IDEA I am trying to push some commits. I have a requirement that on remote server it looks like single action. I click to push and see following window I expected to see squash checkbox here but don't see it. Please help me.
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
96
votes
11 answers

With Mercurial, how can I "compress" a series of changesets into one before pushing?

Let's say I have a local and a remote Mercurial repository. Now, I start working on a feature. I work on it, and when I think it's done, I commit the changeset. Testing it a bit more, I find that I could further improve this feature by tweaking…
Lucas
  • 6,328
  • 8
  • 37
  • 49
92
votes
13 answers

How can I automatically deploy my app after a git push ( GitHub and node.js)?

I have my application (node.js) deployed on a VPS (linux). I'm using git hub as a repository. How can I deploy the application automatically, on git push ?
Advanced
  • 1,457
  • 2
  • 13
  • 12
86
votes
14 answers

git push heroku master says "Everything up-to-date", but the app is not current

I have an app on Heroku that is running old code. I've made a small change and committed the change. I then ran git push heroku master It'll say Fetching repository, done. Everything up-to-date But if I go and look at the app, it's all old code.…
Darkmatter5
  • 1,189
  • 3
  • 12
  • 19
85
votes
9 answers

Unable to Git-push master to Github - 'origin' does not appear to be a git repository / permission denied

This question is related to my problem in understanding rebase, branch and merge, and to the problem How can you commit to your github account as you have a teamMate in your remote list? I found out that other people have had the same problem. The…
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
85
votes
3 answers

Do objects pushed into an array in javascript deep or shallow copy?

Pretty self evident question...When using .push() on an array in javascript, is the object pushed into the array a pointer (shallow) or the actual object (deep) regardless of type.
Travis J
  • 81,153
  • 41
  • 202
  • 273
85
votes
5 answers

gitlab - Push to a repository using access_token

I implemented the oauth2 web flow in order to get access_token from users of my app. With the access_token, I would like to do the following actions: Get user informations Create a repo for this user Push code to this repo (using git push …
Simon Bruneaud
  • 2,263
  • 2
  • 12
  • 24
82
votes
2 answers

Push a commit in two branches with Git

how do I push a commit in two branches? I can't use "git push", because then it pushes to three branches, and i just want the commit in two of them.. Ive tried a "git merge HEAD --commit id from branch A--" in branch B, but then it takes…
Madoc
  • 1,605
  • 3
  • 17
  • 30
82
votes
9 answers

Time complexity of unshift() vs. push() in Javascript

I know what is the difference between unshift() and push() methods in JavaScript, but I'm wondering what is the difference in time complexity? I suppose for push() method is O(1) because you're just adding an item to the end of array, but I'm not…
dperitch
  • 1,869
  • 2
  • 17
  • 22