Questions tagged [git-remote]

git-remote is a command used to manage the set of tracked remote repositories.

git-remote is a command used to manage the set of tracked remote repositories for a git repository. It allows to setup, remove and edit the set of repositories ("remotes") whose branches are tracked.

See the man page.

930 questions
25
votes
1 answer

Is there any reason to not set 'git fetch' to always use the --prune option?

Using git fetch --prune deletes local remote tracking branches when the branch on the remote machine has been deleted. Setting remote.origin.prune to true using the following... git config --global fetch.prune true ...makes using the fetch command…
timfoil
  • 415
  • 4
  • 11
25
votes
11 answers

Git - error: RPC failed; result=22, HTTP code = 401 fatal: The remote end hung up unexpectedly

I am using ubuntu 11.10 machine. I have installed git of version 1.7.7.1. I am using git-cola to push and pull my code and I was able to commit and push my changes successfully. Now, I have changed my machine and my new system is with the same above…
user915303
24
votes
2 answers

git, How to push local branch into the specific remote

Could you explain how to push a local branch to a specific remote branch? $ git branch -vv dev 4d46c96 [origin/dev] Merge branch '1783' into dev dev_3_feature 226b914 second commit in dev_3_feature dev_second_feature 6b5f10f second commit in…
Eugene
  • 1,680
  • 3
  • 14
  • 23
23
votes
7 answers

git remote repository contains commits unmerged into the local branch

I am using git inside netbeans IDE. I wanted to change the commit message for the most recent commit I had made. I did that, checked the amend last commit checkbox and committed it to my local repository. When I push this commit to my github repo, I…
james
  • 1,667
  • 5
  • 26
  • 38
23
votes
4 answers

How can I associate local unversioned code to git remote repository?

I need to associate a clean unversioned code to an existing git remote repository. I explain better my situation. My project is moved from svn to git. I have a svn local working copy with old code (nothing new to commit) that has to be syncronized…
bato
  • 547
  • 1
  • 3
  • 12
22
votes
1 answer

Critical situation in removing a local branch

I'm using the following command to remove a local branch with force delete option: $ git branch -D My question is, If I delete a local branch that had an upstream set and then do a normal push, it won't delete the remote branch…
Benyamin Jafari
  • 27,880
  • 26
  • 135
  • 150
22
votes
1 answer

git remote prune origin does not delete the local branch even if its upstream remote branch is deleted

This is a common use-case for me, I clone a repository, checkout a branch, do some code changes, make multiple commits, then when it's stable, I do a push to remote, eventually the branch gets merged and deleted, and I'm left with a local branch…
saketrp
  • 2,323
  • 3
  • 16
  • 18
22
votes
3 answers

Git submodule to track remote branch

I'm trying to use git submodules for aggregating 10+ repositories into one structure for easy development. It is supposed to clone the module and checkout a branch. Instead, the module is checked out in detached head mode. git clone…
Nambi
  • 2,688
  • 8
  • 28
  • 37
22
votes
9 answers

Why do I get error: RPC failed; result=52, HTTP code = 0 fatal: The remote end hung up unexpectedly when pushing to github?

I created a new repository on github and wanted to push some files. So I initialize the repository like normal and do git add . to add the current directory (which is my java project folder with bin and src folder inside). Then I added the remote…
Nearpoint
  • 7,202
  • 13
  • 46
  • 74
20
votes
3 answers

Git is not showing all branches on local

I forked a repo from Github. On doing git remote -v it displays: origin https://github.com/myusername/moodle.git (fetch) origin https://github.com/myusername/moodle.git (push) upstream https://github.com/moodle/moodle.git (fetch) upstream …
xan
  • 4,640
  • 13
  • 50
  • 83
20
votes
1 answer

How do I get `git clone --recursive` to recreate submodules' remotes and branches?

I have a project with a handful of submodules. Many of them are cloned from a GitHub fork to which I've added a branch for my custom mods. A typical setup is like thus: In local folder: MyProject1/Frameworks/SomeAmazingRepo/ $ git branch…
Hari Honor
  • 8,677
  • 8
  • 51
  • 54
19
votes
3 answers

How to make git repo remember all remotes?

I have a git repo that is a fork of another repo. As a rule I will normally add a remote called upstream, which is the original repo I forked from. $ git remote -v origin git@github.com:skela/awesomeproject.git (fetch) origin…
Skela
  • 884
  • 10
  • 18
18
votes
2 answers

Understanding .git/config's 'remote' and 'branch' sections

Here's the contents of the remote and branch sections of my .git/config file. [remote "origin"] url = https://EvanAad@bitbucket.org/EvanAad/bitbucketstationlocations.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] …
Evan Aad
  • 5,699
  • 6
  • 25
  • 36
18
votes
1 answer

"src refspec does not match" and "failed to push some refs" errors on git push

Possible Duplicate: Error when “git push” to github I tried to push my new branch (let's just call it new_branch) to remote rep. There is no such branch there yet, but git push origin new_branch:new_branch should create it. When I try to do it,…
alex
  • 10,900
  • 15
  • 70
  • 100
17
votes
4 answers

Failing to push to GitHub (this exceeds GitHub's file size limit)

My local branch is not uploading to master because, as the error output states, "downloads/ue4-test-8.zip is 363.08 MB; this exceeds GitHub's file size limit of 100.00 MB" I already removed this file and yet any commits I make get rejected. I've…
mryamz
  • 394
  • 1
  • 2
  • 11