## New Project Import
* cd new_project_folder
* git init
## Add and Modify Files
* git add file1 file2
* git diff --cached or git status or git log -p (--stat --summary)
* git add commit or(新規作成ファイルまたは修正ファイルの追加)
* git commit -a > add and commit(修正ファイルのaddのみ新規作成ファイルはadd commandが必要)
* git mv filename1 filename2
## Remove Files
* git rm file1 file2
* git commit
## History
* git log, git log -p, git log --stat --summary
* git-tag v1.0 commitID > make a tag
* git show v1.0, git diff v1.0 > usage of tag
## Make a Branch
* git branch new_idea
* git branch > list of branches
* git checkout new_idea or master > switch branch
* git merge new_idea
* git branch -d new_idea > delete branch
## Git with Shared Project
* git clone http://..../project myrepo > create local copy
* git clone --depth 1 > copy only newest version
* git pull http://.../myrepo master > pull & merge local modification to shared master
* git pull > renewal local copy
* git push > push local modification to the master
## Others
* git gc > cleanup for optimization
git チュートリアル (バージョン 1.5.1 以降用)
No comments:
Post a Comment