Introduction to git & github [ AF - Week 03 - Y3S1 ]

This week was the third week of this 1st semester of third year. For now I could gather some new things about the industry as well as new technologies  by lectures and by my self-studies.

 

Application Framework [ AF ]
 

Git & Github


 
 

Github, is a provider of internet hosting for software development and version control using Git.Github offers the distributed version control and source code management functionality of Git.It provides access control and several collaboration features such as bug tracking, feature requests, task management, continuous integration for any project.  

The first two things you'll want to do are install git and create a free GitHub account.

Git and GitHub are not the same thing.Git is an open-source, version control tool created in 2005 by developers working on the Linux operating system; GitHub is a company founded in 2008 that makes tools which integrate with git. It' not need GitHub to use git, but you cannot use GitHub without using git. 

There are many other alternatives to GitHub, such as GitLab, BitBucket etc. 

  • git clone

git clone [URL]  - This command is used to obtain a repository from an existing URL. 

  ex : -  git clone https://github.com/thathsarahewage/SA_DesignPatternLab_01.git

  • git commit

git commit -m [ Type in the commit message]  - This command records or snapshots the file permanently in the version history.

ex : -  git commit -m "First commit"

  • git push

git push [variable name] master   - This command sends the committed changes of master branch to your remote repository.
 
 ex : -  git push origin master
  • git remote

git remote add [variable name] [Remote Server Link]  - This command is used to connect your local repository to the remote server.

ex : -  git remote add origin https://github.com/thathsarahewage/SA_DesignPatternLab_01.git

  • git merge

git merge [branch name]  - This command merges the specified branch’s history into the current branch.


ex : -  git merge branch2
 
  • git pull

git pull [Repository Link]  - This command fetches and merges changes on the remote server to your working directory.

ex : -  git https://github.com/thathsarahewage/SA_DesignPatternLab_01.git

 

These are some most used git commands and we can do many things than this task such as git checkout,git status, git add, git revert etc.

 

Thank you for visiting my blog !




Comments