作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我在Git上传的文件夹中添加了一个文件。我可以在 unstaged 下看到 SourceTree 中的文件夹。如何使用终端命令将文件推送到在线存储?
我发现我需要先 cd 到本地存储库,我是这样做的:
cd /Users/mainuser/Desktop/Projects
git add -A .
使用 git status
检查状态并输出:
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: ios_projects/2016/Untitled copy 2.rtf // this is the file I want to upload
现在怎么办?如何提交并在线推送?
最佳答案
下一步是提交使用,然后推送到您想要推送的任何分支
git commit -m 'Some message about the change'
git push origin 'branch-name'
关于git - 如何从终端/命令行推送到 git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36890139/
我是一名优秀的程序员,十分优秀!