Git
Basic Commands
git init
- asd
git add <filename>
-
git add .
-
git status
-
git commit -m "<Commit Message>"
-
git push
-
git fetch
-
git branch
-
git checkout
-
git checkout -b
-
git branch -a
- List all the local branches
git branch -r
- List all the remote branches
git branch -d <branch-name>
- Delete a local branch. The -d
option is an alias for --delete
, which only deletes the branch if it has already been fully merged in its upstream branch
git branch -D <branch-name>
- Use -D
, which is an alias for --delete --force
, which deletes the branch "irrespective of its merged status."
git push --delete <remote_name> <branch_name>
- Delete a remote branch
git commit --amend
- Amend/Edit local commit messages
git remote -v
-
git remote --add
-