Skip to content

Github knowledge is necessary to showcase your skills and work with collaborations. Here are some list of command line codes to execute and add new repositories in github. Such as adding new project, changing user name, global initialization of usernames.

License

Notifications You must be signed in to change notification settings

katmakhan/github-course

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

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 <github-url>
    • REMOVE ORIGIN URL
     git remote rm origin
    • VIEW ORIGIN URL
     git remote -v
    • RENAMING ORIGIN URL
     git remote set-url origin <new-url>
  • 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 <name>
    • CHANGE EMAIL
     git config user.email <email>
  • TODO If you want to change the username and user email for the individual project

    • Change the email
     git config user.email <email-id>
    • Change the username
     - git config credential.username <user-id>
    • NOTE:
      • Changing the name, whether name contains spaces or not
       git config user.name "<if name with spaces>"
       git config user.name <if name contains no spaces>
  • RENAME BRANCH

    • Renaming the branch
     git branch -m <oldname> <newname>
  • 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 branch

     git reset --hard origin/master 
  • RESET to a previous COMMIT

     git reset <commithash>
  • FOURCE UPDATE

     git push origin <branchName> --force

About

Github knowledge is necessary to showcase your skills and work with collaborations. Here are some list of command line codes to execute and add new repositories in github. Such as adding new project, changing user name, global initialization of usernames.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published