Day 10 Task: Advance Git & GitHub for DevOps Engineers.

Vishugoyal
3 min readFeb 17, 2023

90DaysOfDevOps

Git Branching

  • Use a branch to isolate development work without affecting other branches in the repository. Each repository has one default branch and can have multiple other branches. You can merge a branch into another branch using a pull request.
  • Branches allow you to develop features, fix bugs, or safely experiment with new ideas in a contained area of your repository.

Git Revert and Reset

  • Two commonly used tools that git users will encounter are git reset and git revert. The benefit of both of these commands is that you can use them to remove or edit changes you’ve made in the code in previous commits.

What Is Git Merge?

  • Git merge is a command that allows developers to merge Git branches while the logs of commits on branches remain intact.
  • The merge wording can be confusing because we have two methods of merging branches, and one of those ways is actually called “merge,” even though both procedures do essentially the same thing.

Task 1:

  • First I created a remote repo and then connected it to the local repo.
  • Created a new branch and then checkout into it.
  • I have created a new file inside the Git folder i.e. “version01.txt
  • Add a new line into the file.
  • Track the untracked file then add and commit it with a valuable commit
  • Push the project till yet.
  • Now update your project and then add and commit it.
  • Again update the profile.
  • check the commit history with the help of the git log command.
  • The git reset command helps us to move the previous commit or go back into the project which was on working.
  • Again check the log and check the head of the branch.

Thank you for giving your precious time for reading this blog/article and also follow me on Vishu Goyal for more such blogs/articles also thanks a lot for keeping your calm and reading till the end. I hope this article helped you :) Happy coding!

You can also mail me at vishugoyal247@gmail.com

--

--

Vishugoyal

I am pursiing B-tech. and also very fond of learning new technology under the guidance of Vimal Daga sir (World Record Holder).