GIT

1. [Setup] Git Clone
git clone [url] [folder-name]
example :
git clone https://{user}@xxx.git {folder}
2. Fetch & checkout
git fetch && git checkout [branchname]
example:
/home/react/dev/api> git fetch && git checkout develop
/home/react/dev/api> git fetch && git checkout master
3. Pull
git pull
4. Check Current Branch
git rev-parse --abbrev-ref HEAD
5. Discard change
git clean -df
git checkout – .
*Before code changed
run : service supervisord restart
How to remove the last commit
git reset --hard HEAD^
git push origin HEAD --force

Comments

Popular posts from this blog

M5Stack ESP32

Express connect to mysql

How to debug msbuild