It's back! Take the 2018 Developer Survey today »
1
vote
2answers
41 views

How to designate a local repository as a remote for another local repository?

In order to better understand how Git works, I'd like to inspect the changes that a remote repository undergoes as it interacts with a local repository (via fetch, push, etc.). Suppose I have two Git ...
1
vote
1answer
57 views

Is there a way to clone a git repository including its remote repositories?

Is there a way to use some git clone / fetch mechanism to keep the repo in my clone up to date including all refs/remotes/ from the remote? This has nothing to do with git fetch --all, git pull --all ...
0
votes
1answer
164 views

How to delete/change the remote origin master branch

I have a movile project repo in bitbucket and I cloned that repo into a eclipse project the remote branch master/origin point too that repo this is ok, but I created another empty repo in bitbucket ...
0
votes
0answers
43 views

Error on Cloning a Git Repository to client machine

Hi everyone I have pushed my Git bare repository to our cloud server with scp -r project.git root@serverip:/home/gitrepos That worked fine. Now I am trying to clone it to another location with ...
0
votes
1answer
31 views

Repo and its clone disagree about HEAD pointer

I’m trying to rename my master branch to 'liveBranch', create a new branch ('devBranch'), then clone the repo (call it repo A) in another folder on the same computer (call it repo B). But when I do so,...
0
votes
0answers
250 views

Setting up an already cloned git workspace as local repository

I have a clone from a remote repository, and i do my work on this clone and does git commit and git push to remote repo. I work using a desktop PC and some times using a laptop. From laptop now I do ...
1
vote
0answers
27 views

Connecting to web hosting site via git in such a way that I can push and pull directly via my local pc

I initialized a bare repository on server git init --bare and then added a remote git remote add origin my.hosting.website.com:my-repository.git then I am trying to pull.I used pull -...
4
votes
1answer
156 views

git cloning two times and pushing through two levels

I am a newbie in git. I don't know if this is possible. what I am doing is I cloned a remote repository in my desktop. I then again cloned that cloned repo into another folder. Is there anyway to ...
1
vote
0answers
73 views

Can I add additional references in an existing repo?

git clone has the --reference <repository> option which sets up a sort of cache that can be used to store objects so not all need to be copied to the newly created repo. A file .git/objects/...
2
votes
0answers
75 views

Git(Hub): Syncing repo without cloning all files

Given I have a fork of a huge repo, which I want to keep updated with the branch upstream. Sadly, my internet connection is currently very bad and I can't fetch everything remote, merge and push it ...
0
votes
1answer
33 views

What is 'remotes/remotename/HEAD' in my cloned Git repo?

I'm trying to set up a local Git repository that uses a specific branch from another repository as a starting template (possibly pulling changes to the template, but never — or at least almost never — ...
-1
votes
2answers
909 views

Git clone doesn't work remote: Repository not found

I'm trying to clone my private repo from the remote host and it works on every other computer but doesn't work for me for some reason. I have already tried, git remote rm origin and git remote ...
3
votes
2answers
1k views

git checkout new remote branch when cloning with depth 1 option

After I did a clone of a repo, a new branch test has been added to the origin remote. But I still see: $ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master What ...
1
vote
1answer
34 views

How to get all remotes urls from remote git repo?

For example, let we have a git repository A, which have two remotes: user@user:~/dev/tmp/some_repo$ git remote -v remote_a /home/user/dev/tmp/a/ (fetch) remote_a /home/user/dev/tmp/a/ (...
3
votes
1answer
29 views

Can I Push Remotes So That They Are Included When The Repo Is Cloned?

Can I push remotes so that if someone clones the repo, the remotes are included and therefore already set up for them? It seems that a standard git push doesn't do this. The git docs here hint that ...
12
votes
3answers
12k views

Setting-up local git repository

I am a fan of using GitHub as my project file repository. But it interest me more if I am able to create a repository on this computer on a different directory path. Then clone that create repository ...
7
votes
3answers
22k views

Get remote repository Git

I am almost newby in Git and just read Git book from the official site. I try understand difference between next cases. git init Project git remote add Project [some-url] and git clone [some-url] ...
0
votes
1answer
1k views

Cannot clone a git repository and have to create a repository locally first and to configure its local remote setting

My ~/.ssh contains two keypairs: id_rsa_foo&id_rsa_foo.pub for user foousername on GitHub (github.com) id_rsa_bar&id_rsa_bar.pub for user barusername on GitHub (github.com) for user ...
12
votes
3answers
2k views

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 [email protected]:skela/...
1
vote
2answers
132 views

Why does cloning a remote Git repo create a remote HEAD, when simply tracking does not?

I have Git configurations for participants in a project that are designed to behave the same for me and for all collaborators. So that, for example, our branch names match and the branches track the ...
3
votes
1answer
62 views

Getting the remotes along when pulling a local repo

Common situation: deployer$ git clone git://gitserver/project.git deployer$ cd project deployer$ ./deploy Lots of errors! deployer$ hack --until-it-works deploy deployer$ git commit -m "fixed it" ...
4
votes
2answers
2k views

clone git repo to a non-empty folder

I have a large C project under git. Someone else has the same C project but he's not using git. Both of us started from the same baseline, but I simply did a git init / git add . and started using ...
3
votes
1answer
95 views

git remotes of same working directory are different (or at least it seems like it)

I have a working directory that I track with GIT on one of my computers and at some point in the past I created a remote (bare) repo on an external hard drive. This remote is called origin. I then ...
1
vote
1answer
279 views

How I can update changes on remote git repository?

I finished to commit and push changes on remote git repository but when I view remote repository's files, these are outdated. I'm using Git Bash. View image The red text are changes made in ...
4
votes
2answers
873 views

Take arbitrary git working copy and make exactly the same as remote branch

Say I have an arbitrary local git working directory that was cloned from some remote. I want to make the local git repository be EXACTLY the same as the remote, irrespective of what's happened to the ...
12
votes
1answer
10k views

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/...
4
votes
1answer
6k views

GIT clone and first GIT push issue

I have two issues. I have Ubuntu 10.10 and I have installed git server with gitolite tool. Everything worked quite good. The gl-setup command of gitolite created 2 repositories: gitolite-admin and ...
3
votes
2answers
1k views

git clone does not checkout active branch

I have a remote bare repository with two branches 'master' and 'testing', where HEAD refers to 'testing'. When cloning this repository git checks out 'master', if 'master' and 'testing' are on the ...
109
votes
3answers
122k views

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://[email protected]/path/to/repo Now, to keep this mirror clone updated with all ...
51
votes
3answers
29k views

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....
9
votes
4answers
510 views

Preserve git remotes

I have fixed network of git remotes and I would like them to be attached to repository. Unfortunately git-clone doesn't clone remotes. Is there a way around it?