# GIT COMMANDS ## intallize git repo ``` git init ``` ## add remote url ``` git remote add origin REMOTE_LINK ``` ## add change to the staging area ``` git add FILES_NAMES ``` ## unstage files ``` git reset FILE_NAME ``` ## add commit msg to the added files ``` git commit -m "THE MSG" ``` ## push commited changes to remote ``` git push origin BRANCH_NAME ``` ## check the status ``` git status ``` ## create new branch ``` git checkout -b BRANCH_NAME OR git branch BRANCH_NAME ``` **NOTE: checkout -b create new branch and switch to it branch crreate new brnch with out switching** ## Change git init default branch name ``` git config --global init.defaultBranch main ``` ## create README file ``` echo "CONTENT" >> README.md ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up