Some Useful Gitbhub commands

||
Posted 1 year, 6 months ago
||
Views 147
||
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

Discussion

rocky
Posted 10 months, 2 weeks ago

useful information



Actively looking for JOBS
Joined on April 15, 2020


Latest Videos


Wanna Post Ad?
Reach a large group of audience by posting an ad about your business here. For more details
Drop us a Message