'Git and Github - II : Tutorial for Beginner


Get started with Git and Github

Install Git

  1. For Windows, Download git from here and install it on your device
    1. Browse to the official Git website here.
    2. Click the download link and allow the download to complete.
    3. Extract and Launch Git Installer.
    4. Leave the default, unless you have reason to change it until then, click Next.
    5. Once the installation is complete,  Launch Git Bash, then click Finish.
  2. For Linus, Use code
    $ sudo dnf install git-all

Initialize with credentials

  1. Make sure your git is installed properly. To do that check version
    1. git --version #To check version of git installed
  2. Provide Credentials (name and email) to git
    1. git config --global user.name "Your_username"
      git config --global user.email “Your_email”
      git config --global — list # To check the info you provided.

Start with Github

  1. Signup on github
  2. Create a repository
    1. Add repository name, description
    2. Choose public or private 
    3. Tick to add readme, license and git ignore
    4. Click on create repository

Work on Github project

  1. Go to your project in github and click on the green code button
  2. Copy the link
  3. Go to your folder directory, right-click and select git bash here
  4. Clone your project with following code
    1. git clone <<Project Link>>
  5. Make changes as required on the project
  6. After making changes follow following steps to add files
    1. git add . 
    2. OR 
    3. git add <filename> #for specific files to add
  7. Commit the changes with message
    1. git commit -m "<message>"
  8. Push everything to github to respective branch
    1. git push origin <branch name>
  9. Sometimes If you are not logged in on Github, login prompt can be shown to enter your credentials otherwise, you can go and check your repository page on GitHub it should look something like this which contains all your files.

Congratulation your project is updated on git


Popular posts from this blog

Story of the OLD AGE HOMES

10 Advantages and Disadvantages of Aboard Study

My First Blog