Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 610 Bytes

GitCommand.md

File metadata and controls

31 lines (24 loc) · 610 Bytes

Git Command Notes

clone repository

  • git clone "http...."

get user name

  • git config --get-all user.name

add user name or email as information

  • git config --global user.email "email"
  • git config --global user.name "name"

commit record

  • git log

branch frame

  • gitk --all

list all branch

  • git branch

add new branch

  • git branch branch_name

switch to another branch

  • git checkout branch_name

commit with extra text

-s git commit -m "text"

Commit a file

1. - git add [file name1]
2. - git add [file name2]
3. - git commit -m "text"