Last active
June 28, 2021 04:08
-
-
Save shivanandmn/84f7c26f6c3b75863a76d9e3daadff28 to your computer and use it in GitHub Desktop.
Basic git commands I am learning while at work.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -a #get all branch | |
git checkout master #get to the master branch | |
git checkout -b new_branch #(create and get) new branch | |
git push -u origin new_branch #push changes to new_branch to repo. for first push -u will set upstream/tracker. | |
git pull origin guru #pull the repo from guru branch | |
git add . # add present changes | |
git commit -m "fdhkfjd" # commit all the added changes. | |
git push origin guru #then push it | |
git branch -vv # upstream settings | |
#for mac quotes are required | |
git add --all -- ':!path/to/file1' ':!path/to/file2' ':!path/to/folder1/*' | |
# if your first time user then you need to use this, this helps to connect your pc to github. | |
#https://kbroman.org/github_tutorial/pages/first_time.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment