Skip to content

Git Rebase

satyamgoel edited this page Sep 26, 2020 · 2 revisions

Introduction:

Links&Videos:

Installation & preparation:

Usage:

##################################### How to update our forked repo with git rebase

Step 1: Add the remote (original repo that you forked) and call it “upstream” Step 2: Fetch all branches of remote upstream. Step 3: Rewrite your master with upstream's master using git rebase. Step 4: Push your updates to master. You may need to force the push with “ --force ”

1.go to repository with your terminal 1.1 look with $ git remote -v if origin and upstream is avaible. 1.1 if no origin avaible clone the ohioh repo to you folder $git clone or $ git remote origin https://github.com/ohioh/gaen-mobile.git 1.1.if no upstream avaible you have to add the pathcheck repository as upstream $git remote -v remote add upstream https://github.com/Path-Check/gaen-mobile.git 1.1 now the upstream and our repo show be avaible with $git remote -V 2. $ git fetch upstream 3. $ git checkout master Check out your fork's local master branch. 4. $ git merge upstream/master Merge the changes from upstream/master into your local master branch. This brings your fork's master branch into sync with the upstream repository, without losing your local changes. If your local branch didn't have any unique commits, Git will instead perform a "fast-forward".

##################################### bring the OHIOH repo branch up to date with your offline data

git commit -m "Centent"

git push

git push --set-upstream origin origin

##################################### hold your work a live while working on other branch

##################################### 3 Steps to Push to a remote repository 1.Add $ git add myfile.txt

2.Commit $ git commit -m "first commit"

  1. Push $git push ##################################### bring the main(master)mark to the newest version with merge

$ git checkout master $ git merge issue1

##################################### delete a branch go to the main branch to check out the name like this: $ git branch delete: $ git branch -d

to create and go to the new repo $ git branch -b

##################################### see the last changes $ git log

$it log --graph --oneline ##################################### Global config $git config Set the username/email for a specific repository git config user.name ohioh git config user.email github@ohioh.de

git config --get user.name git config --get user.email.

git config --global user.name ohioh git config --global user.email git@ohioh.de

##################################### go to the master (develop) folder ... $ git merge The Called commit whc

Contributing:

Credits & Links:

Partners:

License:

Clone this wiki locally