[英]Starting with Git - individual commits and pushes? Or all at once?
We were just setup with a Git-TFS solution at my work.我们刚刚在我的工作中设置了 Git-TFS 解决方案。 Up until now, important files were kept on network shares, in a format like so:
到目前为止,重要文件都保存在网络共享中,格式如下:
Obviously I will rename the file to Filex before copying into the repository, starting with the oldest.显然,在复制到存储库之前,我会将文件重命名为Filex ,从最旧的开始。
My question is, do I need to perform a Commit AND Push for each file-version I drop in my repository?我的问题是,我是否需要为我放入存储库的每个文件版本执行提交和推送? Or just Commit, and Git will see them as different versions?
或者只是提交,Git 会将它们视为不同的版本?
git commit
: This command will commit the changes to your local repository. git commit
:此命令会将更改提交到您的本地存储库。
git push
: This command will push your local commits to the remote repository. git push
:此命令会将您的本地提交推送到远程存储库。
There is no need to do git push every time when the file content is changed , just do a git commit whenever you change the file and do a git push, after you are done with all your changes无需每次更改文件内容时都执行 git push ,只需在更改文件时执行 git commit 并在完成所有更改后执行 git push
For example.例如。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.