Some Useful Gitbhub commands

Posted 4 years, 1 month ago
Views 457
1 min read
0 reactions

Add Files To Git

git add .
git commit -am "Commit Message"
git push

Roll Back Code To Last Commit

git checkout .

Create and Switch To A New Branch

git checkout -b branchName

Switch To A Different Branch (Already Created)

git branch BranchName

Push Branch To Github

# To Push A Branch
git push origin BRANCHNAME
# To push your master branch
git push origin master

Switch Back To Your Master Branch

git checkout master

Merge Your Branch Back Into Your Master Branch
While Checked into your branch...
git merge
# Or while checked into your master branch
git merge BranchName
Delete Old Branch After You've Merged It To Master

git branch -d oldBranchName

See What Branch You're On

git status

Resolve Merge Conflicts Visually
git mergetool

0 reactions


Posted 3 years, 5 months ago

useful information

Looking for Freelancing Jobs
Joined on April 15, 2020

Latest Videos