GIT. GIT. GIT
The layers are Physical. Github - Way of storing snapshots
Download git into the local machine.
Search on Google "git SCM', download and install into the respective local machines
Choose .git and .sh extentions.
Create a new repository.
echo "# git" >> README.md
go to your project folder
git init
git status (tells which branch, which commits)
git add (from local file system to "Staging area")
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:mohit3wadhwa/<repo name>.git
git push -u origin master
Connecting GITHUB repo (remote) to the local staging area with HTTPS.
git remote add origin https://github.com:mohit3wadhwa/git.git
git push
if above does not work (because of not having master branch at remote), use below:
git push --set-upstream origin master
Github credentials will be populated. Enter them and its done!
Connecting GITHUB repo (remote) to the local staging area with SSH.
(SSH Setup / Password-less Github Authentication from the local machine)
Generate ssh key for the machine using "ssh-keygen" in terminal
Public key for Github and Private key for local machine
Copy public key (complete)
go to Github > profile > edit profile > ssh and GPG key > New SSH key
Give Title and paste key in there
Click Add SSH key. It's done!
Do the following only if Https way was setup earlier
git remote remove origin
git remote add origin git@github.com:mohit3wadhwa/git.git
Pull code from GITHUB to local
git pull
Push an existing repository from
git remote add origin git@github.com:mohit3wadhwa/git.git
git push -u origin master
SSH Setup / Password-less Github Authentication from the local machine
git remote add origin git@github.com:mohit3wadhwa/git.git
git push -u origin master

Top comments (0)