我在当地有两家分公司,
主要的
和
德夫
.当我尝试提交并推动从dev到main的更改时,它表示一切都是最新的,实际上什么都没有发生。此外,我的github回购协议并没有反映我当地回购协议的最新变化,尽管我曾尝试推高它,它说它是成功的。我的新回购协议上没有承诺。
当我输入“git remote show origin”时,这是输出:
$ git remote show origin
* remote origin
Fetch URL: <myRepo'sURL>
Push URL: <myRepo'sURL>
HEAD branch: main
Remote branches:
dev tracked
main tracked
Local branch configured for 'git pull':
main merges with remote main
Local refs configured for 'git push':
dev pushes to dev (fast-forwardable)
main pushes to main (up to date)
我对git很陌生,所以我会边学边学。有人知道我为什么会遇到这个问题吗?如果需要,我可以运行其他命令来提供更多信息
要推动变革,我遵循以下流程:
首先是git状态。输出如下:
On branch dev
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: __pycache__/app.cpython-39.pyc
modified: app.py
no changes added to commit (use "git add" and/or "git commit -a")
然后,我运行“git add”此命令没有输出。
接下来是“git commit-m”测试。以下是输出:
$ git commit -m "test"
[dev 5af52ce] test
2 files changed, 4 insertions(+), 8 deletions(-)
最后,“git push origin main”。以下是输出:
$ git push origin dev
Enumerating objects: 20, done.
Counting objects: 100% (20/20), done.
Delta compression using up to 16 threads
Compressing objects: 100% (14/14), done.
Writing objects: 100% (16/16), 1.77 KiB | 1.77 MiB/s, done.
Total 16 (delta 10), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (10/10), completed with 3 local objects.
To <myRepo'sURL>
0f1504d..5af52ce dev -> dev
谢谢