Friday, May 11, 2018

Git Hub basics- Source control tool

Hey Folks,

Few updates on Source Control tool, which I recently learn, would like to share with you.

GitHub (originally known as Logical Awesome LLC)[3] is a web-based hosting service for version control using git. It is mostly used for computer code. It offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features. It provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project (Reference taken from Wikipedia)
Repository-A repository is usually used to organize a single project. Repositories can contain folders and files, images, videos, spreadsheets, and data sets – anything your project needs. You can create public and private repository
Branch-
Branching is the way to work on different versions of a repository at one time.
By default your repository has one branch named master which is considered to be the definitive branch. We use branches to experiment and make edits before committing them to master.
Basic Git Commands
  1. git init- create new local repository
  2. git status-List the files you've changed and those you still need to add or commit
  3. git push origin master- Send changes to the master branch of your remote repository
  4. git commit -m "Commit message"-Commit changes to head (but not yet to the remote repository):
  5. git commit -a- Commit any files you've added with git add, and also commit any files you've changed since then
Steps
1. Login through git url
2. Start Project 
3. Create project and follow link
4. Install git on local machine
5. Create folder on c:
6. Type cmd on url and write git command
7. Change environment variable to your account and path %git_home%\bin
8. Again go to c: folder and write command cmd and git
9. Clone the project to url with ‘ git clone https://githubprojectpath/hit Project.git”
10. Enter username and password
11. Copy your local code to clone folder and follow git basic commands

Regards,
Trupti