对吉特来说是新手。
我有一个根文件夹,其中包含我想要添加到本地Git存储库的源代码。
这就是我所做的(我错过了什么吗?)
转到根文件夹
cd ~/MySource创建存储库
git init添加所有东西
git add .把一切都交出来
git commit -m "First commit, hope it works"没有错误,所以我们可以走了?我的开发工具有Git和内置的,看起来很好.
发布于 2013-09-23 00:18:40
是的,您现在已经将您的代码置于版本控制之下。
我强烈建议,如果你是Git新手,那么就用这个快速诅咒来学习Git -> 有15分钟想学Git吗?
如果你向吉顿承诺,你可以向他倾诉。
$ git config --global user.name "Your Name" # Set your Git name
$ git config --global user.email youremail@gmail.com # Set your Git email将您的代码设置在版本Conroll下
$ 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
$ 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 Githubhttps://stackoverflow.com/questions/18950099
复制相似问题