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
92
votes
6 answers

How to view remote Git revision on Heroku

For deploying to Heroku, I use git push heroku master. But how do I see which revision I pushed up to heroku? (I'm often in doubt if I pushed the recent version up) For those not familiar with it, Heroku's create script generates a remote git…
Jesper Rønn-Jensen
  • 106,591
  • 44
  • 118
  • 155
89
votes
5 answers

How to change a connection to GitHub from SSH to HTTPS?

I created my first repository in GitHub yesterday. When making the connection I used SSH instead of HTTPS, so I went through a little painful SSH key creation and connection process. At some point I got stuck and the connection failed. I wondered at…
dickbarba
  • 901
  • 1
  • 6
  • 5
87
votes
5 answers

How to disconnect a local Git repository from remote master

How do I completely disconnect a local Git repository from all remote branches? I cloned a Git repository from github.com, but then it was deleted and I don't want Git to report any changes needing to be "pushed up". I've tried googling this, but I…
Cerin
  • 60,957
  • 96
  • 316
  • 522
84
votes
5 answers

What is the difference between 'origin' and 'remote' in git commands?

In git lingo, are origin and remote the same thing? Or does origin refer to the local directory? In the case of git push -u origin master: Which of the following interpretation is correct? "push everything upstream to the remote repo called…
YCode
  • 1,192
  • 1
  • 12
  • 28
84
votes
27 answers

error: src refspec master does not match any

I have tried to follow the solutions suggested in this post but it didnt work and I am still getting: src refspec master does not match any. Here is what I did: Followed this solution // adding the file I created $ git add . $ git commit -m…
special0ne
  • 6,063
  • 17
  • 67
  • 107
81
votes
5 answers

Difference between git remote add and git clone

What does the clone command do? Is there any equivalent to it in svn? What is the difference between git remote add test git://github.com/user/test.git And git clone git://github.com/user/test.git Does the name of the created repo matter?
nacho4d
  • 43,720
  • 45
  • 157
  • 240
79
votes
3 answers

Completely remove files from Git repo and remote on GitHub

I accidentally added a folder of images and committed. Then, I made one more commit. Then I removed those files using git rm -f ./images and committed again. Right now, I have made a lot more commits in that branch (master). In my HEAD, I don't…
shadyabhi
  • 16,675
  • 26
  • 80
  • 131
79
votes
4 answers

How to convert a readonly git clone from github to a forked one

From time to time I encounter this issue. Let's say that I did following to read the source code of rails because I am running into some issues. git clone git://github.com/rails/rails.git During the research I tested something and now I have a fix…
Nick Vanderbilt
  • 2,475
  • 3
  • 27
  • 33
76
votes
17 answers

GitHub: Permission denied (publickey). fatal: Could not read from remote repository

I´m having trouble with GitHub. I´ve playing around with a remote repository of Git. When I now try to make any changes to the remote directory, i.e. git remote show origin or git push -u origin master I get this error Permission denied…
Ulli H
  • 1,748
  • 1
  • 19
  • 32
69
votes
5 answers

Git add a worktree from existing remote branch

In my remote repository there are 3 branches (master and 2 long running branches): master #the common features are here like Core, DAL,... north #customized for A company (long-running) razavi #customized for B company (long-running) At my…
vaheeds
  • 2,594
  • 4
  • 26
  • 36
64
votes
3 answers

What does "git remote" mean?

What does "remote" mean? When cloning a repository located at a central location, aren't we creating its remote version? When I execute the command $ git remote I get origin. What does this mean? When I execute $ git branch -r I get origin/master.…
Sandbox
  • 7,910
  • 11
  • 53
  • 67
62
votes
5 answers

What is the difference between git push origin and git push origin master

Is there any difference in pushing the master branch of a local git repository to the master branch of a remote repository called origin with git push origin master or with git push origin?
Hilbert-
  • 623
  • 1
  • 5
  • 4
58
votes
2 answers

Merge two remote branches in a Git repository

I have one remote repository with many branches. For example, my repository name is: http://navis.com/MyRepo.git Its branches are: development production (master) testing I would like to merge the development branch into the production (master)…
Sai Ye Yan Naing Aye
  • 6,622
  • 12
  • 47
  • 65
57
votes
6 answers

Git push to live server

We have a website that has all its PHP/HTML/JS/CSS/etc files stored in a Git repository. We currently have 3 types of computers (or use cases) for the repository. Local developer: pull latest changes, make changes, commit to local repo, push to…
Petah
  • 45,477
  • 28
  • 157
  • 213
57
votes
4 answers

Git - Checkout a remote tag when two remotes have the same tag name

I had hoped this would work: git checkout remote/tag_name but it doesn't. This does: git checkout tags/tag_name but I'm doing something weird where I have a lot of remotes, and I'm worried about what happens if two remotes have the same tag. Is…
Narfanator
  • 5,595
  • 3
  • 39
  • 71
1 2
3
61 62