1) for clone git project:
git clone url of project
2) To create a new branch and swith it to at the same time (-b is for switch)
git checkout -b branchNameToCheckout
3) To create a branch then separtely switch (above command is shorthand for)
git branch branchName
git checkout branchName
To delete a branch
git branch -d branchName
it will be fail if there are any file left for merge and you are still on that branch
4) To add the new files for staging
For all files : git add *
For any particular file : git add "file name"
5) To commit the changes
git commit -a -m "meanigful message"
6) To merge
first checkout the branch you wish to merge into and then run git merge command
git checkout master
git merge localBranch
7) To see which files are unmerged at any point after a merge conflict, you can run git status
git status
git clone url of project
2) To create a new branch and swith it to at the same time (-b is for switch)
git checkout -b branchNameToCheckout
3) To create a branch then separtely switch (above command is shorthand for)
git branch branchName
git checkout branchName
To delete a branch
git branch -d branchName
it will be fail if there are any file left for merge and you are still on that branch
4) To add the new files for staging
For all files : git add *
For any particular file : git add "file name"
5) To commit the changes
git commit -a -m "meanigful message"
6) To merge
first checkout the branch you wish to merge into and then run git merge command
git checkout master
git merge localBranch
7) To see which files are unmerged at any point after a merge conflict, you can run git status
git status
No comments:
Post a Comment