Skip to content

Latest commit

 

History

History
32 lines (32 loc) · 3.05 KB

GitIntro.md

File metadata and controls

32 lines (32 loc) · 3.05 KB

Introduction to GitHub

GitHub is a code hosting platform which allows for version control and collaborative software building.

  1. Create a new Repository on GitHub Web UI named

  1. mkdir && cd

  1. git init # Initializes the Git repository/repo
  2. git clone https://www.github.com/sPaMFouR/ARIES_DataArchival git clone # Obtains a local copy of an existing repo git pull # Updates the local copy with new commits in the master branch of the remote repo git pull # Updates the local copy with new commits in the specified branch of the remote repo

  1. echo "# Random Text " >> Test.md # Add a random file for testing purposes of pushing

  1. git add Test.md # Adds the selected files

  1. git commit -m "Add a dummy file" # Commits all changes with a message

  1. git remote add origin https://github.com/sPaMFouR/ARIES_DataArchival.git # Tag 'origin' as short for repo URL

  1. git checkout -b avinash # Creates a new local branch by 'avinash' git branch -m # Renames the specified branch git branch -m # Renames the current branch

  1. git config credential.helper store # Used to save your credentials (username and password) for GIT in the .init folder for future logins

  1. git push origin avinash # Pushes all local commits to the branch 'avinash'

  1. git push origin avinash:master # Push commit from local branch 'avinash' to branch 'master'