Git 基本コマンド

Gitコマンド カンニング用

Git Submodule

Add submodule

git submodule add git@github.com:xxxxxxxxx

Confirm submodule

git submodul

Operetion

Edit In submodule

git add .
git commit -m ''
git push

In Parent

git add .
git commit -m ''
git push

other woker

git pull
git submodule update -i

Delete submodule

git submodule deinit repository
git rm -rf repository
vi .gitmodule

delete submodule

.git/config

delete submodule

rm -rf .git/modules/SUBMODULE

Git stash

Save

git stash save

List

git stash list

Rstore

git stash apply stash@{0}
git stash apply stash@{0} --index

Delete

git stash drop stash@{0}

Git commit

Reset 1 previous

git reset --hard HEAD^
git reset --soft HEAD^

Change commit massage

git commit --amend

Commit clearup

# when not commit
git commit --fixup <target hash>
git rebase -i --autosquash <the on before target hash >
# when commited
git rebase -i  <the on before target hash >

tppkgit rebase -i --autosquash c441d237826d5f90d3cbebcaf741c7edaf06ce90

Git branch

# list
git branch -a
# Create
git checkout -b

Git log

# all
git log
# lines
git log -5
# Date
git log --since=2017-12-1
git log --until=2017-12-1
# Branch

git log ex

git rebase

# git rebase
git rebase -i <hush_num>
#git rebase delete
git rebase --abort

おっさんWEBエンジニア奮闘記©2007 WEBDIMENSION