We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git clone https://github.com/MillZhang/work-desk.git
git commit -m '注释'
git add git pull git commit -m '' git push
查询repo的状态. git status -s: -s表示short, -s的输出标记会有两列,第一列是对staging区域而言,第二列是对working目录而言.
git remote -v
git remote set-url origin git@github.com:MillZhang/work-desk.git
打开git,git config --global user.name "xxx" ssh-keygen -t rsa -C "xxxx@qq.com" 打开https://github.com/settings/keys 添加ssh-key
Changes not staged for commit
git commit -am "" or git commit -m 'msg' -a //-a 表示 all
按i然后写入,写入后按esc键退出编辑状态,然后输入:wq,回车即可
git init
git add
git commit -m "init commit "
git
git@github.com:MillZhang/python-demo.git
git remote add origin git@github.com:MillZhang/python-demo.git
执行完这个操作后,打开.git/config文件,多出一下的信息:
.git/config
[remote "origin"] url = git@github.com:MillZhang/python-demo.git fetch = +refs/heads/*:refs/remotes/origin/*
git pull --rebase origin master
[branch "master"] remote = origin merge = refs/heads/master
git push -u origin master
注: 如果省略了步骤6,远程仓库与本地代码不一致的话,则会出现如下的错误:
error: failed to push some refs to 'git@github.com:MillZhang/python-demo.git'
https://www.cnblogs.com/code-changeworld/p/4779145.html
The text was updated successfully, but these errors were encountered:
No branches or pull requests
下载代码
添加文件
提交三步曲
git status
查看当前协议
https切换回ssh
不输入用户名密码提交指南
错误
Changes not staged for commit
2018-3-2[新增] 本地分支推送到远程仓库
git init
创建本地git仓库git add
添加文件到暂存区git commit -m "init commit "
,将暂存区的文件推送到git仓库git
代码库,如:git@github.com:MillZhang/python-demo.git
git remote add origin git@github.com:MillZhang/python-demo.git
执行完这个操作后,打开
.git/config
文件,多出一下的信息:git pull --rebase origin master
,注:pull=fetch+merge执行完这个操作后,打开
.git/config
文件,多出一下的信息:git push -u origin master
注: 如果省略了步骤6,远程仓库与本地代码不一致的话,则会出现如下的错误:
https://www.cnblogs.com/code-changeworld/p/4779145.html
附录
The text was updated successfully, but these errors were encountered: