Steps to use git:
1. Create a new folder, then enter the terminal,
2. cd < folder path > ——-> enter the current directory;
2.PSW ———— > View current path
3.git init--------------------> Initialize git
4. git config user.name tangranyang ———— > Configure user Information User name, and mailbox
git config user.email [email protected]
5. Git config-l ——————— > View configuration information
6. Git config-global user.name tangranyang —————————— > Configure global git Account
git config-global user.email [email protected]
7. cd< folder path > ——— > Skip to current directory
8. Touch Person.h person.m ——————— > Build files or go directly to build projects and folders
9. Git Add. —————— > Add to Version control, with Dot, add all
9.1 git status ——————— > View commit status
Ten git commit-m "ban version submit" ———————— > Submit to local, submit must add content
10.1 git log ———————— > View historical version
10.2 git config-global alias.lg "Log-color-graph-pretty=format: '%cred%h%creset-%c (yellow)%d%creset%s%Cgreen (%CR)%c (bold blue) <%an>%creset '-abbrev-commit ' —————— > set the output of log
10.3 git config alias.st status ————————— > alias for Status St
git reset-hard head^ ———————— >head for the branch name "^" for a fallback version
Git Reset-hard head~1
Git reset-hard "version number" ——————— > back to the specified version
git reflog ————————— > View all operating versions
———————————————— Network Download ———————————
0.git Init-bare ————————————— > Create a remote repository
1.git clone "URL" —————— network download
2. Git push ——————————— > submit to remote Service
3. Git pull ——————————— > get the latest updates
————————— Configuration ignores Files ——————————
1. Search Gitignore Find oc Ignore file copy
2.CD Catalog
3. Echo-e "Copied content". Gitignore ———————— > generate the. gitignore file
4. Git Add. Gitignore
5.git commit-m "Notes"
6.RM file Delete File
7. Git push
———————————————— settings ignore the submitted profile —————————————
Basic use of Git