git-pull

Git pull/fetch with refspec differences

岁酱吖の 提交于 2019-11-26 20:28:29
问题 Using refspec is a convenient way to grab a remote branch and create a similar one but with given name (or the other way round: create a remote one with a given name different from the local one). I'm puzzled about one tiny thing - as pull will also do the merge with current branch I would expect different behavior from: git fetch origin master:mymaster and from git pull origin master:mymaster Both of the above commands seem to produce exactly same result - that is a local branch called

How do I resolve a conflict after git pull?

▼魔方 西西 提交于 2019-11-26 19:55:33
问题 I have to solve some conflict after a git pull . $ git pull CONFLICT (rename/add): Renamed vignette_generator_mashed.h->vision_problem_8.h in 49423dd0d47abe6d839a783b5517bdfd200a202f. vision_problem_8.h added in HEAD Added as vision_problem_8.h~HEAD_1 instead Removed vignette_generator_cross_square.cc Automatic merge failed; fix conflicts and then commit the result. So I googled it a bit, and found people saying using git mergetool . But here is what I got: $ git mergetool merge tool

How do I pull from another computer's repository in Git?

折月煮酒 提交于 2019-11-26 18:57:51
问题 For example, I have cloned the origin repository on two computers. Then, I go ahead and make some changes and commit to the local repository of computer A. How do I now pull these changes to computer B? Both computer A and B are connected to a network. What I am looking for will be the equivalent of someone manually creating a patch and sending it to me, which I can apply to my working copy/local repo. 回答1: If the machine you want to pull from is accessible via ssh , you can add the

How can I make my local repository available for git-pull?

*爱你&永不变心* 提交于 2019-11-26 17:29:41
问题 I have a working copy repository that I've been working in no problem; the origin for this repository is on GitHub. I'd like to make my working copy repository available as the origin for my build machine (a VM on another physical host), so that commits I make to my working copy can be built and tested on the build machine without having to go via GitHub first. I already have a build for the GitHub repository going, but I'd like this to be a "golden" repository/build; i.e., if something goes

pull command error : Failed connect to github.com:8080

寵の児 提交于 2019-11-26 16:34:54
问题 I tried to pull repository so that I can merge the changes made to my repository. But while using the pull command it gives following error: $ git pull https://github.com/ShrutiRuparel/depot.git master error: Failed connect to github.com:8080; No error while accessing https://github.com/ShrutiRuparel/depot.git/info/refs fatal: HTTP request failed I tried setting the http proxy but no change. push command worked perfectly fine but error with pull command. Any suggestions? 回答1: I had the same

GIT pull error - remote object is corrupted

大兔子大兔子 提交于 2019-11-26 15:44:46
问题 $ git pull remote: fatal: object 21f3981dd35fccd28febabd96f27241eea856c50 is corrupted error: git upload-pack: git-pack-objects died with error. fatal: git upload-pack: aborting due to possible repository corruption on the remote side. remote: aborting due to possible repository corruption on the remote side. fatal: protocol error: bad pack header Any ideas why this is failing? When I run git --bare fsck-objects --full I just see dangling links but no broken links. Also git gc didn't help in

Git pull after forced update

匆匆过客 提交于 2019-11-26 14:49:06
I just squashed some commits with git rebase and did a git push --force (which is evil, I know). Now the other software engineers have a different history and when they do a git pull , Git will merge. Is there a way to fix this, except doing a rm my-repo; git clone git@example.org:my-repo.git ? I need something like the opposite of git push --force , but git pull --force did not give the intended results. AD7six To receive the new commits git fetch Reset You can reset the commit for a local branch using git reset . To change the commit of a local branch: git reset origin/master --hard Be

Merge, update, and pull Git branches without using checkouts

一个人想着一个人 提交于 2019-11-26 14:48:22
问题 I work on a project that has 2 branches, A and B. I typically work on branch A, and merge stuff from branch B. For the merging, I would typically do: git merge origin/branchB However, I would also like to keep a local copy of branch B, as I may occasionally check out the branch without first merging with my branch A. For this, I would do: git checkout branchB git pull git checkout branchA Is there a way to do the above in one command, and without having to switch branch back and forth? Should

Is it possible to pull just one file in Git?

冷暖自知 提交于 2019-11-26 11:45:32
问题 I am working on a Git branch that has some broken tests, and I would like to pull (merge changes, not just overwrite) these tests from another branch where they are already fixed. I know I can do git pull origin that_other_branch but this will attempt to merge lots of other files, for that I am not yet ready. Is it possible to pull and merge only the specified file (and not everything) from that another branch? This is not a duplicate of Git pull request for just one file as all answers to

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\