Git git

Git clone Automatically executes git init git remote

Git init initializes the repository

Git add file name (add file to Git repository)

Git commit -m

Git status check git cache status

Git remote add Alias Git address

Git push an alias on a local branch: the remote branch pushed to is master by default.

Git remote -v

Git pull downloads the remote repository code

Git Stash clears cache files

Git apply restores cache files

Git config –global –list

Git config –global user.name Git config –global user.name

Git log is used to view log rollback

Git reflog Displays all local logs

Git reset to a hash point

Git Stash reports code errors to the workspace

Git Stash apply falls back into the cache

Git diff to see which files have changed

Git snapshots

git flow

branch

Git branch Displays branches

Git branch creates a branch

Git branch -d deletes a branch

Git chekcout -b copies the code and creates a branch to switch under the branch

Git checkout — (filename) Change file changes in the cache

Git fetch (alias) (branch name) pulls but does not change the local repository

Git merge Merges branches into the current branch

Git fetch (alias) (remote branch):(local branch) pull remote branch to local branch

Git reset –hard head^

Git reset HEAD uncheck the file in the cache

Git reset –hard head Deletes all files in the cache

Git tag (tag) Creates a tag

Git tag -d (tag) Deletes a tag

Git push — Tags push a Tag remotely

Git push (alias) :refs/tags/(Tag) Remove remote tags

Git push (alias):(branch name) deletes the remote branch

Git branch -d (branch name) Deletes the local branch name