我知道有关于此的数百个教程,但我无法确定从哪里开始.我正在使用MAC并且运行Ubuntu 14.04的远程系统.我想要做的是将文件夹上传到我的组织的github存储库.已经存在一个repo,我想创建一个分支并在该分支中上传我的文件和文件夹.
我试过了
git branch branch_name
git checkout branch_name
Run Code Online (Sandbox Code Playgroud)
但是分支机构不会显示在网页上.我也试过从网页创建一个分支,但我不知道如何上传文件.我也不确定如何实际导航到我要上传的存储库.
请告诉我如何做到这一点.
谢谢!
Old*_*800 11
ls -a
.如果你看到.git
,你可能在正确的位置.
git init
.git clone <https://something/foo/bar.git> <folder you want the repository to be in>
.如果您没有为该文件夹指定任何内容,它将在当前文件夹中创建它.git checkout -b <your branch name>
git add <changed file> [<another changed file> [...]]
请注意,更改的文件可以是文件夹.
git rm <file>
Git知道您删除了它.git commit -m "what you did"
git checkout master
和git merge <your branch name>
.这会将新分支上的所有提交移动到原始分支.git push
git push --set-upstream <https://something/foo/bar.git> <your branch name>
git pull
.git rebase master
.对不起,如果我进入太多细节!
归档时间: |
|
查看次数: |
8565 次 |
最近记录: |