Github Guide for Dummies
This contains all the necessary CMD line commands to execute and add new repositories in github.
- Adding new project
- changing user name
- global initialization of usernames
- Renaming branch
- Adding to remote repo in github
Follow these methods to get started
-
GIT ORIGIN
- ADD ORIGIN URL
git remote add origin- REMOVE ORIGIN URL
git remote rm origin- VIEW ORIGIN URL
git remote -v- RENAMING ORIGIN URL
git remote set-url origin -
GIT PROCEDURE:
- ADD Files to staging
git add .- COMMIT the changes
git commit -m "init"- PUSH the changes to GITHUB
git push origin master -
VIEW GITHUB CREDENTIALS
- VIEW GIT USER and EMAIL credentials
git config --global --list -
CHANGE GITHUB CREDENTIALS
- CHANGE USERNAME
git config user.name- CHANGE EMAIL
git config user.email -
TODO If you want to change the username and user email for the individual project
- Change the email
git config user.email- Change the username
- git config credential.username- NOTE:
- Changing the name, whether name contains spaces or not
git config user.name "" git config user.name
-
RENAME BRANCH
- Renaming the branch
git branch -m -
LOG HISTROY
- To view the history of commits
git log -
FORCE RESET DO it after the
git pull origin master, to forcefully make it same as the remote branchgit reset --hard origin/master -
RESET to a previous COMMIT
git reset -
FOURCE UPDATE
git push origin--force