Git Commands With Examples
Git Commands git clone Usage: git clone [url] This command is used to obtain a repository from an existing URL. git add Usage: git add [file] This command adds a file to the staging area. Usage: git add * This command adds one or more to the staging area. git commit Usage: git commit -m “[ Type in the commit message]” This command records or snapshots the file permanently in the version history. Usage: git commit -a This command commits any files you’ve added with the git add command and also commits any files you’ve changed since then. git status Usage: git status This command lists all the files that have to be committed. git branch Usage: git branch This command lists all the local branches in the current repository. Usage: git branch [branch name] This command creates a new branch. Usage: git branch -d [branch name] ...