Git Contd..
To Staging Area
- Add all changes
git add -A - Add only modified files but not untracked
ignoring files
-
To ignore certain files, in the root folder of repository create a file called as
.gitignore -
To remove all untracked files from working tree
git clean -fd .
Git branch
- Refer Here for docs
- Branch always points to latest commit on it
- In Git default branch is
masterand now a days majority of the organizations have moved tomainas default branch. - To rename branch
git branch -m <new-name> - To create a new branch
git branch <new-branch-name>


- To checkout to a branch (HEAD pointing to other branch)


- Now lets do a couple of commits


- Lets checkout to main
Git Tag
- Refer Here for docs
- Tag always points to a specific commit
