-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtext2.txt
15 lines (15 loc) · 2.17 KB
/
text2.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
git remote => gives list of all the remotes
git remote add origin "url" => create a new remote named origin(this can be changed) pointing to a github repository
git branch -M main => change the name of current branch to main
git push -u origin main => push the commit to the remote named origin
git checkout -b develop => create a new branch develop and switch to it
git checkout master => leave the current branch and go to master branch (It's recommeded to have current branch clean before leaving
git branch => list of all the branches
git merge develop => merge the develop branch with the current branch
git branch -v => last commit of al the branches
git branch --merged => list of of merged branches
git branch --no-merged => list of all the branches which ain't merged
git braanch -d develop => gives error if not merged
git push origin bugfix => push the local branch bugfix on server
git push -d origin bugfix => deletes bugfix branch from server
git push -u origin branch1:branchOne => It will create a new branch on server named branchOne and push the changes made on branch1 locally.