git拉取分支推送分支
拉取远程分支gitpull拉完分支我开始工作了开始对项目改改改。改好了准备推送上去。先确认哪些文件被修改了以免遗漏或误加文件没遇到过gitstatus然后将所有修改的文件推送到暂存区,先存着注意add后有点啊。gitadd.要是只想提交特定的文件就指定一下文件gitaddsrc/main.js提交到本地仓库m就是message消息的意思gitcommit-m修复登录bug推送到远程服务器gitpush不出意外就有意外了远程服务器给我拒了中英文翻译一下。翻译error: failed to push some refs to https://gitlabXXXXXXXXXXXt错误无法将一些引用推送到 ‘https://gitlabXXXXXXXXXXXt’hint: Updates were rejected because the remote contains work that you do not have locally.提示更新被拒绝因为远程仓库包含你本地没有的提交。hint: This is usually caused by another repository pushing to the same ref.提示这通常是因为另一个仓库推送到了同一个分支引用。hint: If you want to integrate the remote changes, use git pull before pushing again.提示如果你想合并远程的更改请先执行git pull再重新推送。hint: See the Note about fast-forwards in git push --help for details.提示更多细节请参阅git push --help中的 “Note about fast-forwards”。好听它的拉取最新代码。gitpull如果要拉dev分支用git pull origin dev然后界面出现翻译Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a topic branch.请输入一条提交信息说明这次合并的必要性尤其是当你要把更新后的上游分支合并到某个主题分支时。Lines starting with # will be ignored, and an empty message aborts the commit.以#开头的行会被忽略如果提交信息为空则会中止这次提交。先按esc键盘再输入:wq命令再enter键按 Esc 键确保退出编辑模式。 输入 :wq :命令 write保存 quit退出。 按 Enter 回车好了再推送gitpush