Create New Gitlab Branch

  1. Config user.name
  2. Config user.email
  3. git clone
  4. touch then Add
  5. git commit

Others Git Command

See all branches (highlight with star is the position of the branch)

git branch

Switch the branch

git checkout branch_name

Create new branch and switch to ti

git checkout -b branch_name

Delete branch

git branch -d branch_name

Delete branch on github

git push origin:branch_name

Revert

git reset –hard commit_hash

Add a single file

git add file_name

Commit the change

git add .

git commit -m “COMMENT TO DESCRIBE THE INTENTION OF THE COMMIT”

git push REMOTE NAME-OF-BRANCH / git push origin master

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store