- Creating of repository:
git init
- The git add command is used for staging changes in Git prior to committing them to the current branch:
git add <file_name>
- Commit creating:
git commit -m 'Some commit'
- The command using to see the status of working directory:
git status
- We have to enter this command into the terminal to see the list of created commits:
git log
- Or we can use this command to see it in abbreviated form:
git log --oneline
- This command will be useful if we want to go to another branch of project (another version):
git checkout <the number of commit>
- We will use this command if we wanna go to the master branch:
git checkout master
- And this command will be useful if we want to compare changes commited in Git:
git diff
- Firstly we have to create an account on the GitHub
- The command used to take the copy of remote repository is:
git clone <the link from the git hub, that we copied there>
- The command we use to copy changes from the web browser:
git pull
- The command we use to upload the local changes to the remote repository on the Git Hub, that we are working with:
git push
-
If we want to make a copy of the repository in our profile on the GitHub, we have to do Fork where we want to
-
Then we have to create one more branch and to do all the changes only there
-
After our work is finished we can do the push to our account and then pull request with offered changes