Git: Two Sights, One Vision.

Vision, from GIPHY
Git, from GIPHY

What is Git?

Another Day, Another Way.

Commands Explanation.

Staging and Committing

$ git add .
$ git commit -m"[Commit Messages]"

Status

$ git status

Log

$ git log

Branches

$ git checkout -b [branchName]
$ git checkout [branchDestination]

Merging

$ git merge [branchDestination]
$ git push [yourBranchNow]

Rebase

Git Rebase, From Atlassian

Remote

$ git init$ git remote add origin https://github.com/[username]/[new_repo]

Push

$ git push origin [branchName]

Pull

$ git pull origin [branchName]

The Setup Steps.

Git Installation

A New Local Repository

$ git init
$ git add .
$ git commit -m"First Change"

A New Online repository

$ git remote add origin https://github.com/[username]/[new_repo]
$ git push -f origin master

Clone Online Repository

$ git clone https://github.com/[username]/[repository].git
$ cd [repository]
Git Merge!, from GIPHY

Thanks For Reading!

References:

--

--

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