Hi Readers, In this blog we will be looking about few important GIT commands that becomes very handy in our day to day development routine.
These commands are very useful when you want to contribute to some one’s or you own repository by applying your ideas into the code base.
Let’s discuss few git commands
Cloning a repository
git clone <repo-url>
Create and switch to new branch
git checkout -b <branch-name>
Create new file to branch ‘feature/demo’
Stage the newly created file
git add index.html
Commit the staged file
git commit -a -m ‘<message>’
Check status of scm
Push changes to scm
git push –set-upstream origin feature/demo
Switch to main branch and Merge with main branch
git checkout main then git merge feature/demo
Push changes to main branch
That’s all for this blog. However If you have any doubt, feel free to contact me at firstname.lastname@example.org.
Thank you for sticking to the end. If you like this blog, please do show your appreciation by giving thumbs ups and share this blog and if you feel, give me suggestions on scope of improvements.