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
231
votes
7 answers

Git branching: master vs. origin/master vs. remotes/origin/master

I think I'm on the right track to understand the basic concepts of git. I've already set up and cloned a remote repository. I also created a server side empty repository, and linked my local repository to it. My problem is that I don't understand…
John Rumpel
  • 4,535
  • 5
  • 34
  • 48
221
votes
5 answers

Why does Git tell me "No such remote 'origin'" when I try to push to origin?

I am very new to Git; I only recently created a GitHub account. I've just tried to push my very first repository (a sample project), but I'm getting the following error: No such remote 'origin' I ran the following commands: git init git commit -m…
Vijay
  • 3,152
  • 3
  • 24
  • 33
203
votes
4 answers

What are the differences between local branch, local tracking branch, remote branch and remote tracking branch?

I just started using Git and I got really confused between different branches. Can anyone help me to figure out what the following branch types are? local branches local tracking branches remote branches remote tracking branches What is the…
eded
  • 3,778
  • 8
  • 28
  • 42
202
votes
2 answers

Differences between git remote update and fetch?

Is git remote update the equivalent of git fetch?
David
  • 2,533
  • 2
  • 18
  • 16
171
votes
3 answers

How to update a git clone --mirror?

I have created a git repository to mirror a live site (which is a non-bare git repository): git clone --mirror ssh://user@example.com/path/to/repo Now, to keep this mirror clone updated with all changes from its remote origin, which command or…
J. Bruni
  • 20,322
  • 12
  • 75
  • 92
155
votes
3 answers

Why am I merging "remote-tracking branch 'origin/develop' into develop"?

I'm the only one in my organization who's making commits with the following message: Merge remote-tracking branch 'origin/develop' into develop Not sure what I'm doing to cause them, but I'd like to stop. What command am I issuing to create this…
Jordan Warbelow-Feldstein
  • 10,510
  • 12
  • 48
  • 79
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
11 answers

List all local branches without a remote

Problem: I want a way of deleting all the local branches I have that do not have a remote. It's easy enough to pipe the names of the branches into a git branch -D {branch_name}, but how do I get that list in the first place? For example: I create a…
JC Denton
  • 1,515
  • 2
  • 10
  • 6
138
votes
8 answers

How can I check write access to a remote Git repository ("can I push?")

I am building a (somewhat limited) Git client. To set up a repository, you enter the URL to the remote repo. I want to check whether the user has read+write access to that repository. If not, I present an authentication dialog. I check 'read' access…
Yang Meyer
  • 5,409
  • 5
  • 39
  • 51
135
votes
12 answers

Change a Git remote HEAD to point to something besides master

How do I set a Git remote's HEAD reference to point to something besides "master"? My project has a policy not to use a "master" branch (all branches are to have meaningful names). Furthermore, the canonical master repository is only accessible via…
JasonSmith
  • 72,674
  • 22
  • 123
  • 149
116
votes
10 answers

fatal: does not appear to be a git repository

Why am I getting this error when my Git repository URL is correct? fatal: 'git@skarp.beanstalkapp.com/gittest.git' does not appear to be a git repository fatal: The remote end hung up unexpectedly See it in context below, or as a…
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
116
votes
3 answers

git delete remotes: remote refs do not exist

In short; How can I delete remote multiple merged remotes? More background; I have a git repo with tens of remotes which have been merged into master. I can delete these remotes one at a time by using: git push --delete origin…
Jqw
  • 1,171
  • 2
  • 8
  • 4
115
votes
1 answer

git remote prune – didn't show as many pruned branches as I expected

From the man page: Deletes all stale tracking branches under . These stale branches have already been removed from the remote repository referenced by , but are still locally available in "remotes/". So I removed a bunch of…
Felixyz
  • 19,053
  • 14
  • 65
  • 60
96
votes
11 answers

How to add my current project to an already existing GitHub repository

I'm very new to Git. I've been searching for an answer, but I couldn't find one. In my computer I have a project folder like this: project_a --some_folder --another_folder --.git And I have a repository on GitHub, let’s say…
Vor
  • 33,215
  • 43
  • 135
  • 193
95
votes
14 answers

Git push error: "origin does not appear to be a git repository"

I am following the instructions given here to create a Git repository. All went well until the last line: $ git push -u origin master fatal: 'origin' does not appear to be a git repository fatal: The remote end hung up unexpectedly I'm…
Al Lelopath
  • 6,448
  • 13
  • 82
  • 139
1
2
3
61 62