获取GitHub仓库的本地副本,跟踪更改并将更新推回到远程 [英] Get a local copy of a GitHub repo, track changes and push updates back to the remote

查看:174
本文介绍了获取GitHub仓库的本地副本,跟踪更改并将更新推回到远程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在GitHub上有一个回购站,我想通过对我从中取得的文件夹所做的更改进行更新。

I have a repo on GitHub and I want to update it with changes made to the folder I pulled it from.

有什么步骤,没有行话或短语一个新的Git用户应该从他们 cd目录?

What are the steps, without jargon or short hand terms, a new Git user should do from the moment they cd directory?

包括如何跟踪本地对任何文件所做的更改,然后如何将这些更改和更新发送回远程存储库。

Including how to track the local changes made to any files and then how to send those changes and updates back to the remote repository.

推荐答案

最简单的流程是这个:
$ b

The most simple flow is this:

# clone the repository (from github, for example)
git clone git@github.com:username/reponame.git
cd reponame    

# edit some files

# add them to the index
git add file1.txt
git add file2.gif

# review your changes
git status    

# commit the changes
git commit -m "Decription of my change"

# push them back to the remote repository
git push origin master

这是应该继续下去的基本流程。不过,地段 为了学习git的基础知识,资源,我强烈建议你仔细阅读它们。开始并不像看起来那么困难。

This is the basic flow that should get you going. However, there's lots of resources for learning the basics of git, I highly recommend you go over them. Getting started is really not that difficult as it seems.

这篇关于获取GitHub仓库的本地副本,跟踪更改并将更新推回到远程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆