Skip to main content

Git Usage

Basic usage

# clone repo
git clone <https_url_repo>
# delete remote branch
cd <project_name>

Committing changes

  • Provide meaningful commit messages to indicate the commited change.
  • Prefer verbs to address the type of change (Added, Changed, Fixed, Removed, etc)

Pushing

Attention: git push pushes everything. Use

  • git push origin <branch_name> to actually push.

Push -f

push -f should be avoided. If it is proved necessary, instead of using git push -f origin branch_name use:

git push --force-with-lease origin <branch_name>