All about Git and GitHub
1. Introduction
Git is a simply version control program designed to handle everything you need either in small project or in large/complex project with speed and efficiency.
In general we can say Git is a distributed version control/management system.
1.1. To install git bash in your local computer
Git Bash is a terminal much like command prompt, but with added UNIX commands that we normally don’t see in Windows command prompt.
Steps
a. Open your browser(google chrome,opera etc);
b. search https://git-scm.com/
c. go to dowload and click on 'windows';
d. after the download is finished then go to the location where the file is stored
e. double click that file and install it (just press next next to install the program)
2. Setting the Username and Email
If you are going to work with a team member then you might need to identify which changes are made by who i,e which friend change the source code, so to identify the particular person we should use the username and email.
2.1. Setting your Git username for every repository on your computer
a. To set the username
$ git config --global user.name "Your name"
Example: $ git config --global user.name "Rajan Midun"
b. To set the email
$ git config --global user.email "Your email"
Example: $ git config --global user.email "rajan20540723@gmail.com"
c. To retrieve the username and email
$ git config --global user.name
$ git config --global user.email
3. Git Initialization
At first go to that directory and open the git bash by right clicking and selecting "Git bash here"
and then follow the following steps
a. $ git init
Create an empty Git repository or reinitialize an existing one. This command will create a empty git repository named as .git which contains all the necessary code.
b. $ git status
List which files are staged, unstaged, and untracked.
c. $ git add .
post all the data to the staging area
d.
Comments
Post a Comment