git里,状态显示有变化,但pull和push时却说Already up-to-date,什么情况?
过去多啦不再A梦
过去多啦不再A梦 2017-05-02 09:19:16
0
4
1092

过去多啦不再A梦
过去多啦不再A梦

reply all(4)
阿神

git其实是是一个不用网络的仓库(本地仓库),你也可以把数据pushgithubUp (remote warehouse).
Your current pullpush is all data interaction between the local version library and the remote warehouse.
In your local warehouse, it actually consists of two parts:

  1. Workspace (Working Directory) //Visible
  2. Repository (Repository) //Invisible

    • Temporary storage area(Stage)
    • branch (branch)

The repository contains staging area and branches

Process:

First submission:
- Use git add to move files to workspace ---》Staging area (local)
- Move the file to the temporary storage area through git commit ---》Branch (local)
- by git push 将文件 分支 ---》远程库 (github)

Submit changes:
- Move the file to the temporary storage area through git commit ---》Branch (local)
- by git push 将文件 分支 ---》远程库 (github)

pull&push
- Move the file to the remote library through git pull ---》Branch (local)
- by git push 将文件 分支 ---》远程库 (github)

The above two operations require changes and differences before they can be executed.
Therefore, it will prompt that the contents of the staging area and the remote library are consistent.

滿天的星座

There should be no commit, that is, submission.

The use of git is roughly the following four steps.

add->commit->fetch->pull->push
Change to Chinese
Add code->Submit code->Fetch code->Pull code->Push code

I usually use the following commands.
git add .
git commit –a –m +msg
git push –u origin master

I have written a blog before, you can refer to it below, which has some simple instructions on these commands.
Easy to use command line git

仅有的幸福

status refers to the local status, showing the difference between the local workspace and the local warehouse

The files you created and the files you modified but did not submit (commit) are all displayed here. After submission, they will be empty

pull/push is a synchronization operation between the local warehouse and the remote warehouse, and up-to-date indicates that the local warehouse and the remote warehouse are synchronized

Try it

git commit -m '你的注释'
git push origin dev

Submit to local first, then synchronize to remote

Peter_Zhu

I just solved this problem. I found that there is an extra master in my branch, that is, there is a master and origin/master in the branch. I don’t know what the difference is. After switching the points, the submission is successful directly.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template