Suppose You have got a repository access from someone or free github account.Here I use this link git@github.com:flopcoder/HelloWorldSpring.git to access this.
1. First you need to clone the repository from somewhere.so we need to run command
git clone git@github.com:flopcoder/HelloWorldSpring.git
2. Then you need to go git repo directory your_repo_path/HelloWorldSpring using
cd HelloWorldSpring
3. Then you need to see status
git status
4.then you can change something in this repo and then run git status you will see that something is changed by you.Now you need to run below command
git add .
or
git add filename
first command will add all modified files to local repo and second will add specific file that you need to commit.
5. Now you need to commit this into local repo. You can run below command
git commit -m "First commit by me"
6. Now your code is committed in local repo but you need to push your change into remote repo.So you need to run below command.
git push origin your_branch_name
7. Now again run your "git status" command to check that this is pushed or not.
Thanks.Its just a basic command for git.I will provide detail tutorial later. Happy Coding :P
0 Comments