Git Commands
First, check whether the git is installed on your machine or not!
1. For checking follow the command cmd>git --version
If the git version has not appeared? install the git application properly and add the path in environment variables.
Later follow the commands...
2. git init - (to initialize a new repository)
# config is used to configure the user's identity on the repository
3. git config --global user.name " here your username as per in your GitHub "
4. git config --global user.email "your mail id which is used for GitHub"
5. git status -(to get the current status of repository and files)
6. git add (to add the files to the staging area and files can be tracked)
#git add consists of three versions
1. git add filename - (to add a particular file)
2. git add * - (to add all the files to the staging )
3. git add . - (add all the files to staging including the .files)
7. git commit -m "Here add your message for your commit" (to commit the changes to the repository)
8. git diff -(to analyze the changes between files)
#now push into the server by creating the repository in GitHub
9. git remote add 'here your GitHub repository URL - (for connecting local repository to remote repository)
10. git push -u origin master - (sending files to the remote repository)
No comments:
Post a Comment