Difference between revisions of "Git Cheat Sheet"

From Gejoreuy
Jump to navigation Jump to search
Line 3: Line 3:
  
 
'''Create Branch from Master or Other Branch'''
 
'''Create Branch from Master or Other Branch'''
  $ git pull
+
  $ git pull                                   # pull from original branch
  $ git checkout -b [new_branch_name]
+
  $ git checkout -b [new_branch_name]           # creating new branch in our local fs
  $ git push origin [new_branch_name]
+
  $ git push origin [new_branch_name]           # push our new branch to github or gitlab
  $ git config core.autocrlf false
+
  $ git config core.autocrlf false             # stop replacement warning message

Revision as of 13:56, 9 July 2020

https://www.earthdatascience.org/workshops/intro-version-control-git/basic-git-commands/


Create Branch from Master or Other Branch

$ git pull                                    # pull from original branch
$ git checkout -b [new_branch_name]           # creating new branch in our local fs
$ git push origin [new_branch_name]           # push our new branch to github or gitlab
$ git config core.autocrlf false              # stop replacement warning message