Skip to main content

Posts

Showing posts from November, 2020

Everyday Git Commands

Git is a free and open source distributed version control system and a great one as well! Easy branch creation and jump between branches are some of its greatest features and here are some common commands that I use most of the time, hope this helps. Set global settings for user information $ git config --global user.name "[name]" $ git config --global user.email "[email address]" Check status git status Clone a project and working with branches $ git clone [https://repository-link] $ git checkout [branch-name] Creating a new branch $ git checkout -b feature/[branch-name] $ git checkout -b bugfix/[branch-name] $ git checkout -b release/[branch-name] Renaming an existing branch git branch -m bugfix/[branch-name] feature/[branch-name]  --> Long version of renaming a branch (from bugfix to feature in this example) git branch -m {bugfix,feature}/[branch-name] --> Short version of renaming a branch (from bugfix to feature in this example) Adding changes for commit...