使用 Git (Bitbucket) 更新本地存储库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19365584/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Update a local repo with Git (Bitbucket)
提问by Adrien Neveu
I switched recently to a Bitbucket/git system to work on my code, and i'm having some troubles understanding.
我最近切换到 Bitbucket/git 系统来处理我的代码,但我在理解上遇到了一些麻烦。
Here what I did:
这是我所做的:
- Created a repo on Bitbucket, pushed all my code into it, from my computer A.
- On my computer B, I cloned this code and worked on it. I pushed every modifications on Bitbucket.
- 在 Bitbucket 上创建了一个 repo,将我所有的代码从我的计算机 A 推送到其中。
- 在我的计算机 B 上,我克隆了此代码并对其进行了处理。我在 Bitbucket 上推送了所有修改。
But now, it may be very simple, but I don't know how I get back my modifications I push (the latest commits) on my computer A...
但是现在,它可能非常简单,但是我不知道如何取回我在计算机上推送的修改(最新提交)A...
I tried forking as written on the doc, but it's creating another repo... I don't get it :(
我尝试按照文档上的说明进行分叉,但它正在创建另一个存储库......我不明白:(
Thank you for replying!
谢谢你的回复!
回答by u1860929
You need to pull your changes in your local repo on computer A. Run the following (assuming your branch name is master)
您需要在计算机 A 上的本地存储库中提取更改。运行以下命令(假设您的分支名称是 master)
git pull origin master
For a basic guide to git, check out http://rogerdudler.github.io/git-guide/
有关 git 的基本指南,请查看http://rogerdudler.github.io/git-guide/