首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Git系统回顾

Git系统回顾
EN

Stack Overflow用户
提问于 2013-09-23 00:15:25
回答 1查看 98关注 0票数 0

对吉特来说是新手。

我有一个根文件夹,其中包含我想要添加到本地Git存储库的源代码。

这就是我所做的(我错过了什么吗?)

转到根文件夹

代码语言:javascript
复制
cd ~/MySource

创建存储库

代码语言:javascript
复制
git init

添加所有东西

代码语言:javascript
复制
git add .

把一切都交出来

代码语言:javascript
复制
git commit -m "First commit, hope it works"

没有错误,所以我们可以走了?我的开发工具有Git和内置的,看起来很好.

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-09-23 00:18:40

是的,您现在已经将您的代码置于版本控制之下。

我强烈建议,如果你是Git新手,那么就用这个快速诅咒来学习Git -> 有15分钟想学Git吗?

如果你向吉顿承诺,你可以向他倾诉。

代码语言:javascript
复制
$ git config --global user.name "Your Name"               # Set your Git name     
$ git config --global user.email youremail@gmail.com      # Set your Git email

将您的代码设置在版本Conroll下

代码语言:javascript
复制
$ git init                          # Set up Git on your project    
$ git status                        # See tracked, untracked, and staged files 
$ git add .                         # Add new files to Git    
$ git commit -am "Initial commit"   # Save your project files to Git

承诺GitHub

代码语言:javascript
复制
$ git remote add origin git@github.com:yourusername/yours.git     # Set up git to push to your Github repository
$ git push -u origin master         # Push your code to Github (sets the upstream the first time)
$ git push                          # Push your code to Github
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18950099

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档