You've basically created a commit on the same PR with the changes
2019-12-08 34209, 2019
rahul24
i didnt intend to do that
2019-12-08 34214, 2019
Cyna
So here is somthing you can so
2019-12-08 34249, 2019
Cyna
first make a new branch using `git checkout -b <branch_name>`
2019-12-08 34210, 2019
Cyna
Just to be on the safe side so you dont lose your code incase something goes wrong :)
2019-12-08 34238, 2019
SothoTalKer
each pull request requires a separate branch
2019-12-08 34211, 2019
Cyna
them do `git reset --soft HEAD~1` this will uncommit your changes and not delete them
2019-12-08 34213, 2019
rahul24
ah i see
2019-12-08 34250, 2019
Cyna
then one good thing is to make sure you are on top of latest comments so you dont face merge conflicts
2019-12-08 34235, 2019
rahul24
so just to be clear from within the cloned folder i do git checkout -b <branch_name> and then git reset --soft HEAD~1
2019-12-08 34252, 2019
rahul24
so then i can do git push origin <branch_name>?
2019-12-08 34255, 2019
Cyna
do `git pull --rebase origin master` where origin is metabrainz/musicbrainz-server. You can find if its origin or something else using ``git remove -v
2019-12-08 34207, 2019
Cyna
Yea
2019-12-08 34219, 2019
Cyna
Are you sure there are no merge conflicts rahul24
2019-12-08 34227, 2019
rahul24
which step do i do rebase after?
2019-12-08 34239, 2019
rahul24
ah there seems to be one conflict
2019-12-08 34243, 2019
Cyna
That's one very frequent issue during gci that many students work on the same code
2019-12-08 34210, 2019
Cyna
Are you using vscode ?
2019-12-08 34222, 2019
Cyna
which text editor are you using ?
2019-12-08 34234, 2019
rahul24
vscode
2019-12-08 34204, 2019
Cyna
So in vscode using the git plugin its easier to work it merge conflicts
2019-12-08 34240, 2019
Cyna
*on
2019-12-08 34241, 2019
rahul24
would i follow the same steps you gave earlier even with the merge conflict?
2019-12-08 34248, 2019
reosarevok
Oooh, that's a plugin. I was going to say VSCode makes it super easy, but forgot that
2019-12-08 34222, 2019
reosarevok
!m rishikesh
2019-12-08 34222, 2019
BrainzBot
You're doing good work, rishikesh!
2019-12-08 34231, 2019
reosarevok
(re: your tasks :) )
2019-12-08 34234, 2019
Cyna
Yep congrats
2019-12-08 34209, 2019
Cyna
You shouldn't push the code yet first rebase the code from master
2019-12-08 34226, 2019
Cyna
metabrainz/musicbrainz-server/master
2019-12-08 34249, 2019
Cyna
I've set it up as upstream. What have you set it up as ?
2019-12-08 34205, 2019
rishikesh
Submitted my 5th metabrainz task for review.
2019-12-08 34257, 2019
rahul24
from git pull --rebase origin master i get Your index contains uncommitted changes.
2019-12-08 34258, 2019
rahul24
error: please commit or stash them.
2019-12-08 34203, 2019
reosarevok
rahul24: git stash
2019-12-08 34217, 2019
reosarevok
That will save your current changes, and then you can reapply them with git stash apply :)
2019-12-08 34229, 2019
Cyna
Yep :)
2019-12-08 34206, 2019
rahul24
just did the rebase
2019-12-08 34238, 2019
rahul24
was the commit supposed to be removed?
2019-12-08 34244, 2019
Cyna
You can apply your changes using `git stash apply`
2019-12-08 34246, 2019
rahul24
i still see it on the website
2019-12-08 34204, 2019
rahul24
applied stash
2019-12-08 34230, 2019
Cyna
Now after applying, You'll see a merge conflict
2019-12-08 34202, 2019
Cyna
did you see ?
2019-12-08 34215, 2019
rahul24
i believe the merge conflict was visible to me even before doing thus
2019-12-08 34218, 2019
rahul24
*this
2019-12-08 34230, 2019
reosarevok
It was on the website, but now your code should have it too (a place where it says "HEAD"
2019-12-08 34232, 2019
reosarevok
)
2019-12-08 34249, 2019
Cyna
Merge conflict arises from the code you've created, so when you stashed and rebased the code there should be no merge conflicts. when you apply your code using `git stash apply` you will get a merge conflict
2019-12-08 34211, 2019
reosarevok
That just means basically "someone has changed the file you worked on in the meantime"
2019-12-08 34220, 2019
reosarevok
So you need to just find where (the bit with the HEAD)
Hmm strange there was a merge conflict before and when you did git stash and git stash apply. The merge conflict was gone 🤔
2019-12-08 34209, 2019
Cyna
them you can just do `git push <your_remote_repo> newline` :)
2019-12-08 34217, 2019
rahul24
hmm i still se it online
2019-12-08 34223, 2019
rahul24
alright ill try
2019-12-08 34248, 2019
Cyna
Create a PR and link it here. I'll have a look
2019-12-08 34208, 2019
Cyna
rishikesh: what is your gci id
2019-12-08 34216, 2019
rahul24
hi, so when im trying to create a pull request
2019-12-08 34228, 2019
rahul24
changes from previous task is also being displayed
2019-12-08 34226, 2019
rahul24
nevermind i figured it out sorry
2019-12-08 34255, 2019
Cyna
reosarevok: do recheck the PR when you are free :)
2019-12-08 34203, 2019
rishikesh
It's Rishikesh
2019-12-08 34214, 2019
Cyna
my one. I've made temp fix to make things wokr
2019-12-08 34218, 2019
Cyna
*work
2019-12-08 34214, 2019
reosarevok
I'm going on a hike today but I might get to it in the evening. bitmap: if you have time you could look at Cyna's code :)
2019-12-08 34234, 2019
rahul24
hi Cyna sorry im not sure what went wrong
2019-12-08 34256, 2019
rahul24
changes from the previous pull request are showing in the Showing changed files section
2019-12-08 34212, 2019
BilleeKhoj
reoping
2019-12-08 34229, 2019
sangeetk joined the channel
2019-12-08 34256, 2019
BilleeKhoj
reosarevok: prell
2019-12-08 34244, 2019
CODEin_JDB joined the channel
2019-12-08 34237, 2019
CODEin_JDB has quit
2019-12-08 34249, 2019
nav2002__ joined the channel
2019-12-08 34224, 2019
BrainzGit
[musicbrainz-server] rahulm24 opened pull request #1311 (master…newline): Fix JS on MusicBrainz to have newlines after each call in a method chain where needed https://github.com/metabrainz/musicbrainz-server/…
2019-12-08 34226, 2019
rahul24
Hi Cyna i fixed it, and submitted a PR, though the conflict still shows up
2019-12-08 34237, 2019
rahul24
Thanks reosarevok for helping
2019-12-08 34223, 2019
rahul24
ill try to make a commit to fix this
2019-12-08 34228, 2019
rahul24 has left the channel
2019-12-08 34210, 2019
rahul24 joined the channel
2019-12-08 34200, 2019
nav2002__ has quit
2019-12-08 34217, 2019
BilleeKhoj
(the magical word is prell :o)
2019-12-08 34244, 2019
reosarevok
rahul24: for the other branch, where you accidentally pushed an extra commit
2019-12-08 34226, 2019
reosarevok
You should checkout that branch again, then do git reset --hard HEAD^ (if you haven't yet), then force push
2019-12-08 34250, 2019
rahul24
the confirm/verify ticket?
2019-12-08 34259, 2019
rahul24
ill try fixing the original mistake commit
2019-12-08 34205, 2019
reosarevok
(like a normal push, but with --force at the end of the line - that overwrites what is already on github)
2019-12-08 34214, 2019
reosarevok
Yes, that one :)
2019-12-08 34210, 2019
rahul24
i figured out the problem, for the original verify/confirm ticket, i accidentally committed to master and pushed that
2019-12-08 34214, 2019
reosarevok
To make sure whether the wrong commit got removed, you can use git log
2019-12-08 34242, 2019
rahul24
would the reset and force push still fix it given that?
2019-12-08 34214, 2019
reosarevok
That shows you the latest commits
2019-12-08 34238, 2019
reosarevok
It should, even if your branch is master, I think :)
2019-12-08 34243, 2019
reosarevok
But try and see
2019-12-08 34203, 2019
reosarevok
I'm going to be off now, going hiking, but Cyna and or bitmap can help when they're around :)