GitHub is a code hosting platform which allows for version control and collaborative software building.
- Create a new Repository on GitHub Web UI named
- mkdir && cd
- git init # Initializes the Git repository/repo
- 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
- echo "# Random Text " >> Test.md # Add a random file for testing purposes of pushing
- git add Test.md # Adds the selected files
- git commit -m "Add a dummy file" # Commits all changes with a message
- git remote add origin https://github.com/sPaMFouR/ARIES_DataArchival.git # Tag 'origin' as short for repo URL
- 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
- git config credential.helper store # Used to save your credentials (username and password) for GIT in the .init folder for future logins
- git push origin avinash # Pushes all local commits to the branch 'avinash'
- git push origin avinash:master # Push commit from local branch 'avinash' to branch 'master'