[[git]]
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

todo-git [2017/03/10 23:31]
dblume [Renaming branches]
todo-git [2018/11/16 08:59] (current)
dblume [Changing a local branch without regard to remote branch]
Line 116: Line 116:
  
  
-==== Changing local branch without regard to remote branch ====+==== Creating a branch (and possibly pushing to upstream origin) ====
  
-<code> +  $ git checkout -b new_branch 
-$ git checkout -b branch_name +  Switched to a new branch 'new_branch'
-Switched to a new branch 'branch_name' +
-</code>+
  
-That was the same as "git branch branch_name; git checkout branch_name"+That was the same as "''git branch new_branch; git checkout new_branch''" 
 + 
 +And now if you want to create that branch name at the remote branch, then: 
 + 
 +  $ git push --set-upstream origin new_branch
  
 ==== Changing a local branch to a new remote branch ==== ==== Changing a local branch to a new remote branch ====
todo-git.txt · Last modified: 2018/11/16 08:59 by dblume
 
Recent changes RSS feed Driven by DokuWiki