git-pull

There is no tracking information for the current branch

落花浮王杯 提交于 2019-11-26 11:43:10
问题 I\'ve been using github from a relatively short period, and I\'ve always used the client to perform commits and pulls. I decided to try it from the git bash yesterday, and I successfully created a new repo and committed files. Today I did changes to the repository from another computer, I\'ve committed the changes and now I\'m back home and performed a git pull to update my local version and I get this: There is no tracking information for the current branch. Please specify which branch you

Difference between git pull and git pull --rebase

我是研究僧i 提交于 2019-11-26 11:27:57
I started using git sometime back and do not fully understand the intricacies. My basic question here is to find out the difference between a git pull and git pull --rebase , since adding the --rebase option does not seem to do something very different : just does a pull. Please help me with understanding the difference. mvp git pull = git fetch + git merge against tracking upstream branch git pull --rebase = git fetch + git rebase against tracking upstream branch If you want to know how git merge and git rebase differ, read this . Mauri Lopez Sometimes we have an upstream that rebased/rewound

How can I fetch an unmerged pull request for a branch I don't own?

我只是一个虾纸丫 提交于 2019-11-26 09:06:14
问题 I need to pull in a specific pull request (that hasn\'t been processed into the main stream yet) in the NServiceBus repo: https://github.com/johnsimons/NServiceBus/commit/d8524d53094e8181716e771c1023e968132abc15 It\'s obviously not my repo, but I need the changes that exist in that pull request. What is the best way to do this? 回答1: To fetch a pull into your repository: git fetch git@github.com:jboss/jboss-common-beans.git refs/pull/4/head Then do whatever you want with FETCH_HEAD: git

In what cases could `git pull` be harmful?

安稳与你 提交于 2019-11-26 08:38:35
问题 I have a colleague who claims that git pull is harmful, and gets upset whenever someone uses it. The git pull command seems to be the canonical way to update your local repository. Does using git pull create problems? What problems does it create? Is there a better way to update a git repository? 回答1: Summary By default, git pull creates merge commits which add noise and complexity to the code history. In addition, pull makes it easy to not think about how your changes might be affected by

git stash and apply

倾然丶 夕夏残阳落幕 提交于 2019-11-26 07:51:53
I'm new to git and not quite clear on how stashing works. Let's say I'm working on branch master and try to git pull and receive the error that my local changes would be overwritten and need to be stashed or committed. If I haven't staged any of my changes and run git stash , then do a git pull and and update successfully, what happens when I git stash apply ? In general, If someone else modifies files and I run git pull , what happens when I run git stash apply ? does it overwrite the files that were just updated, regardless of whether or not they were staged when I stashed them? Does it

git pull fails “unable to resolve reference” “unable to update local ref”

时光总嘲笑我的痴心妄想 提交于 2019-11-26 07:50:01
问题 Using git 1.6.4.2, when I do a git pull I get this error: error: unable to resolve reference refs/remotes/origin/LT558-optimize-sql: No such file or directory From git+ssh://remoteserver/~/misk5 ! [new branch] LT558-optimize-sql -> origin/LT558-optimize-sql (unable to update local ref) error: unable to resolve reference refs/remotes/origin/split-css: No such file or directory ! [new branch] split-css -> origin/split-css (unable to update local ref) I\'ve tried git remote prune origin , but it

Update Git submodule to latest commit on origin

柔情痞子 提交于 2019-11-26 06:49:55
问题 I have a project with a Git submodule. It is from an ssh://... URL, and is on commit A. Commit B has been pushed to that URL, and I want the submodule to retrieve the commit, and change to it. Now, my understanding is that git submodule update should do this, but it doesn\'t. It doesn\'t do anything (no output, success exit code). Here\'s an example: $ mkdir foo $ cd foo $ git init . Initialized empty Git repository in /.../foo/.git/ $ git submodule add ssh://user@host/git/mod mod Cloning

Why does git say “Pull is not possible because you have unmerged files”?

烈酒焚心 提交于 2019-11-26 06:12:51
问题 When I try to pull in my project directory in the terminal, I see the following error: harsukh@harsukh-desktop:~/Sites/branch1$ git pull origin master U app/config/app.php U app/config/database.php U app/routes.php Pull is not possible because you have unmerged files. Please, fix them up in the work tree, and then use \'git add/rm <file>\' as appropriate to mark resolution, or use \'git commit -a\'. Why does git say \"Pull is not possible because you have unmerged files\" , and how can I

git pull VS git fetch git rebase

孤人 提交于 2019-11-26 06:10:27
问题 Another question said git pull is like a git fetch + git merge . But what is the difference between git pull VS git fetch + git rebase ? 回答1: It should be pretty obvious from your question that you're actually just asking about the difference between git merge and git rebase . So let's suppose you're in the common case - you've done some work on your master branch, and you pull from origin's, which also has done some work. After the fetch, things look like this: - o - o - o - H - A - B - C

&#39;git pull origin mybranch&#39; leaves local mybranch N commits ahead of origin. Why?

半世苍凉 提交于 2019-11-26 04:35:28
问题 I just observed something odd about git pull , which I don\'t understand. On Friday, I worked on a local branch. let\'s call it mybranch . Before leaving the office I pushed it to origin (which is my github repo): git push origin mybranch . Yesterday at home, I pull ed mybranch to my laptop, did some more coding, and then pushed my changes back to github (origin). Now I\'m at work again, and tried to pull the changes from yesterday to my work machine (I didn\'t change anything in my work