15 49.0138 8.38624 1 0 4000 1 https://www.techpulsetoday.com 300
Git commands for beginners

Git commands for beginners

With multiple people working on a software project, co-ordination sometimes becomes difficult. Git is a version control system (VCS) for tracing changes in computer files and coordinating work on these files. Given below are a few commands that can be commonly used while using this VCS.

Clone remote repo:

git clone [repository-url]

Refresh repo for the latest from remote repo:

git pull

List all branches:

git branch -a

Switch branch:

git checkout [branch-name]

Check the status of the current repository:

git status

Add new files:

git add filename

Browse past commit information:

git log

Browse past commit information by using the one line option:

git log --online

Check-in changes:

git commit -m "Message to commit this file or directory" [directory-or-filename]

Compare file with past revision:

git diff cf39cd1 filename

Reset current branch head (HEAD) to the specified state:

git reset <paths>
Share:
Category:Tech Tips
PREVIOUS POST
Adding the time stamp to the History Command
NEXT POST
Add a welcome message to your terminal
ABOUT
Vijayan

Thanks for stopping by guys! I'm Vijayan and Techpulse is my beloved brainchild. Currently working as a PHP developer in a digital marketing start-up, I'm overly passionate about not just learning new things but also putting those into practice. I swear by a quote I once came across... 'What separates successful people from unsuccessful people is the former's ability to execute'. Feel free to reach out to me if you have any questions, suggestions or feedback. Hoping to see more of you here!

0 Comment

LEAVE A REPLY

This site uses Akismet to reduce spam. Learn how your comment data is processed.