GitHub - 30 GitHub commands used by every DevOps Engineer

๐ช๐๐๐๐ ๐๐๐ ๐ซ๐๐๐ถ๐๐ ๐ป๐๐๐ ๐ช๐๐๐๐๐๐๐๐ || ๐ท๐๐๐ซ๐๐๐ถ๐๐๐ฎ๐๐ ๐ค https://t.me/prodevopsguy ๐ Hi there! We are ProDevOpsGuy, a passionate DevOps enthusiast Tech Community with a strong belief in the power of automation and collaboration to drive innovation. ๐ I thrive in bridging the gap between development and operations, creating seamless and efficient software delivery pipelines. My journey in the world of DevOps has allowed me to blend my technical skills with a knack for problem-solving, enabling me to contribute effectively to agile and dynamic environments. ๐ก With a keen interest in continuous integration, continuous delivery (CI/CD), containerization, and orchestration, I've had the privilege to explore cutting-edge technologies like Docker, Kubernetes, Jenkins, and Ansible. I find joy in designing scalable and resilient infrastructures that enable teams to deploy applications faster and with greater confidence. ๐ Beyond the tech realm, I'm an advocate for DevOps culture, emphasizing collaboration, communication, and a relentless pursuit of improvement. I'm always eager to connect with fellow professionals, exchange insights, and explore opportunities to collaborate on exciting projects. ๐ When I'm not tinkering with the latest DevOps tools, you can find me indulging in books on technology trends, hiking to rejuvenate, and occasionally experimenting with new coding challenges. ๐ Let's connect! Whether you're looking to discuss DevOps methodologies, explore partnership opportunities, or simply share experiences, feel free to reach out. I'm excited to be part of the DevOps journey, driving excellence together.
Introduction:
Git & GitHub has steadily risen from being just a preferred skill to a must-have skill for multiple job roles today. In this article, I will talk about the Top 30 Git Commands that you will be using frequently while you are working with Git.
๐ Essential GitHub Commands Every DevOps Engineer Should Know
1. git init
๐ ๏ธ Description: Initializes a new Git repository in the current directory.
2. git clone [url]
๐ ๏ธ Description: Clones a repository into a new directory.
3. git add [file]
๐ ๏ธ Description: Adds a file or changes in a file to the staging area.
4. git commit -m "[message]"
๐ ๏ธ Description: Records changes to the repository with a descriptive message.
5. git push
๐ ๏ธ Description: Uploads local repository content to a remote repository.
6. git pull
๐ ๏ธ Description: Fetches changes from the remote repository and merges them into the local branch.
7. git status
๐ ๏ธ Description: Displays the status of the working directory and staging area.
8. git branch
๐ ๏ธ Description: Lists all local branches in the current repository.
9. git checkout [branch]
๐ ๏ธ Description: Switches to the specified branch.
10. git merge [branch]
๐ ๏ธ Description: Merges the specified branch's history into the current branch.
11. git remote -v
๐ ๏ธ Description: Lists the remote repositories along with their URLs.
12. git log
๐ ๏ธ Description: Displays commit logs.
13. git reset [file]
๐ ๏ธ Description: Unstages the file, but preserves its contents.
14. git rm [file]
๐ ๏ธ Description: Deletes the file from the working directory and stages the deletion.
15. git stash
๐ ๏ธ Description: Temporarily shelves (or stashes) changes that haven't been committed.
16. git tag [tagname]
๐ ๏ธ Description: Creates a lightweight tag pointing to the current commit.
17. git fetch [remote]
๐ ๏ธ Description: Downloads objects and refs from another repository.
18. git merge --abort
๐ ๏ธ Description: Aborts the current conflict resolution process, and tries to reconstruct the pre-merge state.
19. git rebase [branch]
๐ ๏ธ Description: Reapplies commits on top of another base tip, often used to integrate changes from one branch onto another cleanly.
20. git config --global user.name "[name]" and git config --global user.email "[email]"
๐ ๏ธ Description: Sets the name and email to be used with your commits.
21. git diff
๐ ๏ธ Description: Shows changes between commits, commit and working tree, etc.
22. git remote add [name] [url]
๐ ๏ธ Description: Adds a new remote repository.
23. git remote remove [name]
๐ ๏ธ Description: Removes a remote repository.
24. git checkout -b [branch]
๐ ๏ธ Description: Creates a new branch and switches to it.
25. git branch -d [branch]
๐ ๏ธ Description: Deletes the specified branch.
26. git push --tags
๐ ๏ธ Description: Pushes all tags to the remote repository.
27. git cherry-pick [commit]
๐ ๏ธ Description: Picks a commit from another branch and applies it to the current branch.
28. git fetch --prune
๐ ๏ธ Description: Prunes remote tracking branches no longer on the remote.
29. git clean -df
๐ ๏ธ Description: Removes untracked files and directories from the working directory.
30. git submodule update --init --recursive
๐ ๏ธ Description: Initializes and updates submodules recursively.
Thank you for reading my blog โฆ:)
ยฉ Copyrights: ProDevOpsGuy






