Posts

Showing posts from April, 2020

Essential git commands

1) git config Utility: To set your user name and email in the main configuration file. How to:  To check your name and email:  git config --global user.name and git config --global user.email .  To set your new email or name: git config --global user.name = “xxxx” and git config --global user.email = “xxxx@email.com” 2) git init Utility: To initialize a git repository for a new or existing project. How to: git init in the root of your project directory. 3) git clone Utility: To copy a git repository from remote source, also sets the remote to original source so that you can pull again. How to: git clone <:clone git url:> git clone through ssh:  git clone ssh://username@host.xz/absolute/path/to/repo.git/ git clone username@host.xz:relative/path/to/repo.git/ 4) git status Utility: To check the status of files you’ve changed in your working directory, i.e, what all has changed since your last commit. How to: git status ...