Git: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
No edit summary
Line 14: Line 14:
= Others =
= Others =
<source lang="bash">
<source lang="bash">
git branch -v -a # See local and remote branches
# See local and remote branches
git branch -v -a
master                                c313bf9 ...
master                                c313bf9 ...
remotes/origin/static-files-2        be32085 ...
remotes/origin/static-files-2        be32085 ...
remotes/origin/static-files-3        e9021d8 ...
remotes/origin/static-files-3        e9021d8 ...
git checkout -b static-files-3 remotes/origin/static-files-3 # Checkout remote branch.
...
 
# Checkout remote branch.
git checkout -b static-files-3 remotes/origin/static-files-3
</source>
</source>

Revision as of 08:14, 14 August 2018

Cloned a forked repo.

Initialize a new repo.

Optimize for myself.

git config --global core.editor "vim"

Others

# See local and remote branches
git branch -v -a
master                                c313bf9 ...
remotes/origin/static-files-2         be32085 ...
remotes/origin/static-files-3         e9021d8 ...
...

# Checkout remote branch.
git checkout -b static-files-3 remotes/origin/static-files-3