git-remote

How can I determine the URL that a local Git repository was originally cloned from?

南楼画角 提交于 2019-11-26 15:34:02
I pulled a project from GitHub a few days ago. I've since discovered that there are several forks on GitHub, and I neglected to note which one I took originally. How can I determine which of those forks I pulled? JaredPar If you want only the remote URL, or referential integrity has been broken: git config --get remote.origin.url If you require full output or referential integrity is intact: git remote show origin When using git clone (from GitHub, or any source repository for that matter) the default name for the source of the clone is "origin". Using git remote show will display the

How can I find the location of origin/master in git, and how do I change it?

走远了吗. 提交于 2019-11-26 14:57:55
问题 I'm a Git newbie. I recently moved a Rails project from Subversion to Git. I followed the tutorial here: http://www.simplisticcomplexity.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-a-git-repository/ I am also using unfuddle.com to store my code. I make changes on my Mac laptop on the train to/from work and then push them to unfuddle when I have a network connection using the following command: git push unfuddle master I use Capistrano for deployments and pull code from the

Differences between git remote update and fetch?

流过昼夜 提交于 2019-11-26 12:53:09
问题 Is git remote update the equivalent of git fetch ? 回答1: UPDATE: more information! I should have done this from the start: I grepped the Git release notes in Git's Git repo (so meta!) grep --color=always -R -C30 fetch Documentation/RelNotes/* | less Then I did a less search for --all , and this is what I found under the release notes for Git version 1.6.6: git fetch learned --all and --multiple options, to run fetch from many repositories, and --prune option to remove remote tracking branches

Git submodule to track remote branch

人盡茶涼 提交于 2019-11-26 12:46:19
问题 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 git@github.com:org/global-repository.git git submodule update —init cd config-framework git status $git status #HEAD detached at b932ab5 nothing to commit, working directory clean gitmodules files seems to be okay $cat .gitmodules [submodule \"config-framework\"]

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

微笑、不失礼 提交于 2019-11-26 12:23:43
问题 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 using git version 1.7.11.3 on OS X 10.6.8 $ git remote -v returns nothing Config file for the repository: [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true I\'ve had to open sudoers file using sudo

fatal: does not appear to be a git repository

不羁岁月 提交于 2019-11-26 12:08:12
问题 Why am I getting this error when my git repository url is correct? jitendra@JITENDRA-PC /c/mySite (master) $ git push beanstalk master fatal: \'git@skarp.beanstalkapp.com/gittest.git\' does not appear to be a git repository fatal: The remote end hung up unexpectedly jitendra@JITENDRA-PC /c/mySite (master) $ git clone git://github.com/jquery/jquery.git Cloning into jquery... Remote: Counting objects: 19803, done. Remote: Compressing objects: 100% (5196/5196), done. Remote: Total 19803 (delta

How to update a git clone --mirror?

為{幸葍}努か 提交于 2019-11-26 11:45:33
问题 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 commands I must use? I\'d like to keep everything updated: commits, refs, hooks, branches, etc. Thanks! 回答1: This is the command that you need to execute on the mirror: git remote update 回答2: Regarding commits, refs, branches and " et cetera ", Magnus

How to pull remote branch from somebody else's repo

好久不见. 提交于 2019-11-26 11:43:46
问题 I\'ve got a project hosted on GitHub which somebody has forked. On their fork, they\'ve created a new branch \"foo\" and made some changes. How do I pull their \"foo\" into a new branch also named \"foo\" in my repo? I understand they could submit a pull request to me, but I\'d like to initiate this process myself. Assume the following: Because they forked my project, both our repos share the same \'history\' Although GitHub shows their project was forked from mine, my local repository doesn\

Completely remove files from Git repo and remote on GitHub

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 11:32:42
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 have that ./static/images folder. Due to this, my repo size has increased a lot. How can I remove those blobs completely? And I want to remove it from my remote GitHub repo too. Darhuuk This is what you're looking for: ignoring doesn't remove a file . I suggest you read that page, but here's the specific command to use: git filter-branch --index-filter

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

跟風遠走 提交于 2019-11-26 10:57:24
问题 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 ? 回答1: The default action of git push and git push origin has changed since git version 1.7.11 : Before 1.7.11 , git push by default pushes all branches that also exist remotely with the same name. Since 1.7.11 , git push by default pushes the current branch to a remote branch with the same name. Before and