Push as often as possible pretty much, is my advice. Many adds may be in one commit, many commits may be in one push.īut there is no reason to limit yourself to pushing once a day. Once everything you need is added and committed, it is time to push. So pushing is the superior form of backup and version control because it means that there are at least two copies of your work and its history: one local copy (the stuff you were just working on) and one server-side copy (what you just pushed).
Pushing commits, and therefore files, makes your changes enter into the version control system on the server as well as your local machine, so on GitHub (or Overleaf, or GitLab, or whatever server you are using).
Only committing makes files be under version control on your local machine, e.g., your laptop, but they will not be accessible from another computer. Git cheat sheet Basic git setup : Git config: Set Global config: These will be reflected as Author details in each commit you make Set Local config: ( modify config for current project) Unset config: Adding git to project: Adding Remote repo to Project: Synchronizing local with remote (upstream): Branches in git: Git stash: Save current changes. Git commit -m 'I've just made some very dramatic changes'įor your files to be 100% safe make you must also push them (the next section).