Skip to content

Git CLI

Overview

git is a

# usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
#            [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
#            [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
#            [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
#            [--super-prefix=<path>] [--config-env=<name>=<envvar>]
#            <command> [<args>]

Some process usage

--Initation for new project

git init
--Get File
git clone
--Git Add
git add --all
git add -A
--Commit
--Has Comment
git commit -m 'Taesas'
git commit -m 'jhkjhhkj
--Push
git push
--Get New Version
git pull
git fetch --prune
-- Same Loop for Others
git pull
git add -a
git commit -m
git push
--Merge

git merge origin/
git fetch --all same with git pull nhung khong merge code
--Work in Branch
--Note: Commit to Change to Other Code
Create Branch git checkout -b branch_name
Change Branch git checkout branch_name
Push Branch
git push -u origin form_control
--git checkout branchname go to other
cat .git/config

Reference

https://rogerdudler.github.io/git-guide/

https://topdev.vn/blog/git-la-gi/