Super Quick Guide to GIT & GITHUB

Super Quick Guide to GIT & GITHUB

  • If you want to quickly upload your projects on GITHUB than this guide is for you only:
  • Go to GitHub website:
    • Click on + button in top right
    • Click "New Repository" and Fill the required stuffs
    • Choose "Public" option if you want everyone can see your codes and stuff
    • Click on create repository
    • Remember: For every new project you will need new repo
  • Install Git
  • Now in your system search "Git Bash" and open it
    • Note: It has Linux like prompt
  • Now before doing anything else run the following commands in Git Bash:
    • $ git config --global user.name "Username"
    • $ git config --global user.email "example@abcd.com"
  • Now go to the folder where all the files of your project are present
    • Right click on screen-> Click on Git Bash
    • Git bash will be opened
    • $ touch .gitignore A "gitignore" file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected
    • $ git init : This command creates an empty Git repository
    • $ git add . : "git add [filename]" selects that file, and moves it to the staging area, marking it for inclusion in the next commit. You can select all files, a directory, specific files, or even specific parts of a file for staging and commit.
    • git commit -m "Initial Commit"
    • git status : Just to see if everything is good to go
    • git remote add origin <https url.git>
    • git push origin master : To push your project files on GITHUB

And tada your files are uploaded to Github. You can go and check it in your GITHUB profile

This would be enough to get you started with GIT and GITHUB. But remember this is just the tip of the ice burg