Github
A project in local system which is not a repo in GitHub
intializes an empty git repository
add the files to staging area
1
| git commit -m "message"
|
this creates a master branch in local system
- now create a repo in the github/gitlab
1
| git remote add origin XXXXXX
|
- Upstream branch error - this means that the repo is and the local project are connected but the branch is not configured
Branches
update the new branches
1
| git checkout <branchname>
|
the the present branch that you are working
1
| git checkout -b <branchname>
|
creates a branch locally and checkouts to that branch
1
| git push -u orgin <branchname>
|
Deleting a branch
1
| git branch -d <branchname>
|
deletes a branch locally
git rebase
this command helps in not commiting the merge request so that the commit history deos not have the record of that merge which helps inn the floe of the dev environment.
Changing branch without committing the local changes