last day (14 days later) » 

1:50 PM
1
A: How to keep the forked repo synced to original repo

sajib khanPull master into your branch (say, feature) then solved "8 commits behind". And if you merge feature with master then "10 commits ahead" would be solved. $ git fetch $ git pull origin master # pull latest commits of master $ git push origin HEAD # update remote...

 
this reflects only locally , but i want it to be reflected in my remote fork
 
After pulling, push your changes to remote .
 
now i am still having This branch is 11 commits ahead of xyz:master. How do i solve this?
 
Have you pulled your-branch into master and push to remote master? Give git fetch command at first.
 
yes i did that and one more thing is when i created a pull request its showing all the previous commits that i have done.
 
1:50 PM
Have your pull req is merged with master? And check if your branch's last commit exists on master or not.
 
how do i check that?
because just now i submitted a pull request by creating new branch and in the PR its showing all the previous commits i have done.
 
Go to GitHub -> "your repo" -> "Pull requests" using browser. Then you pull req is in "open" tab then it has not meged yet.
And if your pull req is in "closed" tab then it is merged.
 
2:09 PM
i am contributing to someone else's repository. So when i submitted the PR its showing the all the old commits also.
Thats the problem i am facing.
 
ok. I see you have 14 commits in your PR, right?
Now, if you don't want all 14 commits in that PR then you need to create a new PR existing the commits (may be 3 or 4) you want.d
 
2:28 PM
actually this is the new PR,but i am getting older one also.
How do i do that?
 
The old commits exists in your new branch (from which local branch you created the PR). So, PR is creating with all the commits (old + new).
Do you want my help sharing your Team Viewer screen?
 
Do you want my help sharing your Team Viewer screen? i didn't get you.
 
2:46 PM
ok. You can create a new branch from master (sync with forked repo). Cherry-pick (git cherry-pick <commit-hash>) the commits that you need. Then create another new PR from this new branch.
git log will show you all the commits of current branch. Copy the commit-hash of the commits you need.
 
i have created a new branch.
Cherry-pick (git cherry-pick <commit-hash>) the commits that you need. what is <commit-hash> ?
 
commit-hash = SHA of a commit = commit id
if you give git log command, you wil see like
commit b58184e46be26ba99de00148846cd765585d4888
Author: XXXX <abc@gmail.com>
Date: Tue Jan 10 19:47:50 2017 +0600
here, "b58184e46be26ba99de00148846cd765585d4888" is commit hash
.
In your new created branch you can take a commit of another branch by charry-pick
$ git cherry-pick b58184e46be26ba99de00148846cd765585d4888
 
3:01 PM
but how do i find that?
how should i do it?
I am very new to this
 
go back to your previous created branch you created PR (6317-move-dateTo-json-file).
$ git log
will show you the commits with commit hash
then copy the commit hashes in other place
back to the branch (git checkout ) you created now
cherry-pick the commits sequentially you want to create PR with
 
its showing all the commits done by all people
 
yes. How many commits do you need to create the PR perfectly ?
 
only last 3 PR,remaining all are previous branches
 
from which branch you created new branch now ?
 
3:16 PM
master only, and i have deleted the old branch,
 
ok. By which command you pushed your branch to 'TEAMMATES' repo before?
 
U mean to my local repo ?
 
I actually want to know the remote name of TEAMMATES repo ( where you want to create PR).
 
i used something like this git push <REMOTENAME> <BRANCHNAME>
 
yes. Now give the following commands -
$ git fetch <REMOTENAME>
 
3:21 PM
remote name is teammates ( this is the link to my remote repo github.com/AnaghHegde/teammates )
$ git fetch <REMOTENAME>
this will fetch the latest from the master no?
 
fetch all remote changes for master also for other branches.
Is there any local branch that is sync with your forked repo master branch (TEAMMATES:master)
?
 
there is a local branch 6017-move-date-to-json-file
so now did you get my issue?
i m kind of confused can you please tell me what to do step by step
32
Q: git: Your branch and 'origin/master' have diverged - how to throw away local commits?

RichardI have the following message in git: # Your branch and 'origin/master' have diverged, # and have 3 and 8 different commits each, respectively. # (use "git pull" to merge the remote branch into yours) I would like to throw away the 3 local commits, and pull the 8 remote commits at origin/mas...

i followed this also to clean
 
It is dificult to discuss the issue by chatting.
Can we talk on Skype ?
 
ok sure
 
Can I get your skype ID ?
 
3:32 PM
ok in a minute
Anagh Hegde
 
Multiple account with same name !
Can I get your email ?
 
oh.hangouts?
h.v.anagh@gmail.com
 

last day (14 days later) »