Git-command

Git-command

cd dest
git init
# Stage files or directory
git add <file> or <.>
# Commits only files explicitly staged beforehand
git commit -m "MESSAGE"
# Automatically stages and commits all tracked modified/deleted files
git commit -am "MESSAGE" 

HEAD : current position in the current branch. When branch switch (checkout) HEAD changes

# Create branch
git branch <branch>
# Switch branch 
git checkout <branch>
# Create and switch :
git checkout -b <branch2>
# Delete
git branch -d <branch2>
# List all 
git branch
# Checkout branch feature/signout and then use the command git log --graph --decorate to see previous commit history along with the branch they were committed on.
git log --graph --decorate