DEV Community

Cover image for My Git Learning Journey: Exploring Advanced Commands πŸ“š
Indujha-22
Indujha-22

Posted on

My Git Learning Journey: Exploring Advanced Commands πŸ“š

Hello Learner! πŸ‘‹

Today, I’m sharing a list of some important advanced Git commands that I practiced:

First, to connect a local folder to a remote GitHub repository, I used git remote add origin . Then, I added my files with git add . and committed them using git commit -m "commit message". After that, I pushed my code to GitHub using git push -u origin main.

To view the commit history in a neat and short format, I used git log --oneline.
To create a new branch, I used git branch , and to move between branches, I used git checkout .
There’s also a shortcut where you can create and switch to a branch at the same time using git checkout -b .

To keep my local copy updated, I used git pull origin main.
When I wanted to see the changes between two commits, I used git diff .
And to find out who made changes line-by-line in a file, I explored the git blame command.

These are the Git commands that really helped me advance my skills! πŸš€

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Top comments (0)