Is it a good habit to frequently push git to remote repositories?
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-02 09:38:12
0
5
841

I am new to git and hope to develop a good habit. Please give me some advice.

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(5)
小葫芦

Not a good habit. First of all, you have to understand that using the code library does not mean that it is distributed. It can be used without the remote warehouse. If you are using it alone, why do you need a remote warehouse? Isn't that asking for trouble? Ctrl + S,代码库中的提交应该是一个完整或者相对完整的功能,而不是改一行代码提交一次
另外,GitOr, if you have multiple people using it, then your frequent push to the remote end must often resolve conflicts. Isn’t it asking for trouble if you waste time on resolving conflicts frequently?

仅有的幸福

Personally I don’t think so.
Commit to local frequently, and then push to remote after reaching a small expectation

给我你的怀抱
  1. Frequent commits and pushes are a waste of time

  2. According to the principle of git, every time you commit, you will save an extra snapshot of the code, which wastes hard disk memory (although there is a lot of memory)

  3. The more commits you make, the more problems you have in the future and you need to reverse or cherry-pick, it will be troublesome and difficult to maintain

  4. It is recommended to commit in stages and commit reasonably, otherwise you will not know how to write the commit message

世界只因有你

As mentioned above, frequent commits are a good habit. When you say frequent push, how long do you mean? Generally, the code must be submitted to the remote features branch of the warehouse before getting off work (to avoid long nights and dreams). If you think there is no problem with testing this function, push it to develop. The specifics depend on your git management specifications. Codes from different periods should be pushed to different branches. But it is very necessary to push your own code to the remote branch before get off work every day

PHPzhong

If it is not a major change or you need to get the latest project from another machine, use git add, git commit -m "xx" to save it in the local warehouse.

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