简体   繁体   English

git / Bitbucket版本控制误解

[英]git / Bitbucket revision control misunderstanding

I'm developing a site on my local machine, and then pushing the changes to a remote server when they're ready. 我正在本地计算机上开发一个站点,然后在更改准备就绪时将其推送到远程服务器。 This is my workflow: 这是我的工作流程:

  1. Develop locally 在本地发展

  2. When the changes are made, add the files (git add newfile.abc etc.) 进行更改后,添加文件(git add newfile.abc等)

  3. Commit the files (git commit -m "Adding newfile.abc") 提交文件(git commit -m“添加newfile.abc”)

  4. Run git push origin master 运行git push origin master

  5. Go to Bitbucket, see the commit, Approve it, then jump over to my server. 转到Bitbucket,查看提交,批准,然后跳到我的服务器。

  6. On the server, run git pull origin master 在服务器上,运行git pull origin master

However, I've noticed that the master branch contains all the changes after step 4 (running git push origin master), before I have Approved the commit on Bitbucket. 但是,我注意到在批准Bitbucket上的提交之前,master分支包含第4步(运行git push origin master)之后的所有更改。

There is something I'm not understanding here... can anyone clarify or point out ways I could improve my current workflow? 这里有些我不了解的地方...任何人都可以澄清或指出可以改善当前工作流程的方法吗? Thank you! 谢谢!

The approve button is not really needed for the commit to go into the Bitbucket repository, it is simply used for reviewers to indicate their approval (see https://answers.atlassian.com/questions/119324/user-is-asked-to-approve-commit-on-bitbucket ). 批准进入Bitbucket存储库并不是真正需要批准按钮,它只是供审阅者用来表示他们的批准(请参阅https://answers.atlassian.com/questions/119324/user-is-asked-to -approve-commit-on-bitbucket )。 You should be able to skip step 5 in your workflow without any issues. 您应该可以跳过工作流程中的第5步,而不会出现任何问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM