Open cmirrop opened 8 years ago
master is up to date with all commits from update-cam-bio. Try switching the base for your comparison.
@cmirrop Okay. In your command line, what is the output if you type git status
?
untracked files: update-cam-bio
nothing added to commit but untracked files present
@cmirrop Ah, I think I know what's wrong! Make sure you're on your own branch, then try:
git add <new-file-name>
git commit -m "enter commit message here"
git push -u origin <your-unique-branch-name>
Then try again to create a pull request.
I think I did that, but I'm having the same problem
I did that, got the same problem.... master is up to date with all commits from update-cam-bio. Try switching the base for your comparison.
@johnnyxyz1223 @cmirrop If you have done those steps and continue to have the same result, make more changes locally so there will be a difference. Then go through the steps above.
Too much to try to catch up and get this to work... Missing the instructions for what's next.... I'm losing the train of the class...
@cmirrop Don't worry, we are going to take a break soon and I'll help you get all caught up. 👍
I missed the merged thing, too. I don't know what he's talking about now.
@cmirrop I know you're feeling very behind, but I don't think you're as behind as you think you are. Thank you for being so patient! Here are the next steps:
git push -u origin <your-unique-branch-name>
When I typed in atom update-cam-bio, all my previous changes were gone. It opened a blank file.
@cmirrop Is update-cam-bio
the name of your branch, or the name of your file?
I thought it was the file??
Maybe I don't understand how branches vs files are working.
@cmirrop The file probably had an .md extension, like update-cam-bio.md
. If not, you can create one in the command line with touch update-cam-bio.md
, then open it with atom the same way you were trying.
Aah, branches vs. files, I see how that could be confusing. A branch is a separate copy of the entire repository, and it is made up of all of the files. I will find some more resource to help clarify.
When I type in dir, only a bios folder shows up. I guess I lost all my work.
@cmirrop What does it output if you type ls -al
within the bios folder?
ls is not a recognized command
I have to use dir
@cmirrop Ah, I'm sorry, I forgot that you're on a windows machine. After you cd bios
, what is the output from dir -al
?
@cmirrop If you could use Git Bash, it will alleviate some of these hiccups. I appreciate your patience - it sounds like you have some frustrating issues coming up. 😞
Volume in drive C is OSDisk, Volume Serial Number is 8835-BCD1, File not found
@cmirrop Okay, thank you.
Is there any way you could use Git Bash for these next steps?
I have no idea. What's wrong with Git CMD?
@cmirrop If you're using powershell or command line, it won't recognize the *ix commands. Have you downloaded Git through Git-scm.org of through the GitHub desktop app?
It looks like the class is starting and I dont' have a clue.... :-1:
@cmirrop For now, I don't want you to get too overwhelmed. I suggest watching Patrick finish these next steps and you will have the video and notes to review later.
I haven't used a bash shell in 20 years, and I won't be using that at work.
Sorry you're having some trouble @cmirrop let me see if I can help. @brianamarie was recommending to use Git Bash so that you could follow along with Patrick's commands. Git will certainly allow you to use whichever tool you prefer.
What's holding you back right now so I can help you get back on track?
At this point, I'll just wait for the video to be released so I can go through it at my own pace. Once I start going through the video, who can I contact for questions?
@cmirrop If you have further questions with the video, feel free to contact us at services@github.com. You also might find helpful answers at https://help.github.com/.
I got the same error. But I found the error result from without git commit before git push, in my case.
I have the same issue here
@cmirrop
make git merge <otherBranch>
to merge the branches, then git pull (git url) master --allow-unrelated-histories
to update your local master branch to your remote master branch. Now that your local master branch has the commits of git push --set-upstream origin master
. to your github's master branch now has the commits of your
There isn’t anything to compare. im having this issue
Hi @nithin1097! To create a pull request, you need at least two branches. The branch with changes, which you would like to add to the other branch, needs to have at least one commit that introduces a change from the other branch. Do you have this set up? (If you have this going in a public repository so I could take a look, or if you have any screenshots, that could be helpful too.)
The https://github.community/ community forum may also be a better place to get help in the future. 😊
Hi @nithin1097! To create a pull request, you need at least two branches. The branch with changes, which you would like to add to the other branch, needs to have at least one commit that introduces a change from the other branch. Do you have this set up? (If you have this going in a public repository so I could take a look, or if you have any screenshots, that could be helpful too.)
The https://github.community/ community forum may also be a better place to get help in the future.
Ah, I see @nithin1097! You can see it says, "master and developer are entirely different commit histories". It appears that the two branches share no common commit that could tell them were to merge. Did you create the branch developer
from master
after master
already had one commit, or before? If before, I would recommend
master
git cherry-pick fdd910e990c1bba6ec40a61f2ffaa281ed3619fa
on the new branch.master
and compare (the new branch).I didn't get ur point.
On Wed, Jul 15, 2020, 3:13 PM Briana Swift notifications@github.com wrote:
Ah, I see @nithin1097 https://github.com/nithin1097! You can see it says, "master and developer are entirely different commit histories". It appears that the two branches share no common commit that could tell them were to merge. Did you create the branch developer from master after master already had one commit, or before? If before, I would recommend
- Creating a new branch off of master
- Then locally, use git cherry-pick fdd910e990c1bba6ec40a61f2ffaa281ed3619fa on the new branch.
- Then, you will be able to open a pull request with base master and compare (the new branch).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/githubteacher/fluffy-octo-guacamole/issues/242#issuecomment-658665174, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHEJVTQPKFXZYPANZLKEK3R3V22HANCNFSM4CDVB3MA .
Ok. I'm sorry that wasn't helpful @nithin1097 - If you have the repository locally and are able to follow those instructions, then you should be in good shape. If that's not making sense, I recommend asking in https://github.community/ or searching the internet for the error message "master and branch are entirely different commit histories". Best of luck!
Same issue.
I too had a similar problem but solved the same with the following commands.
git checkout [BRANCH]
git branch master [BRANCH] -f
git checkout master
git push origin master -f
For more detailed description you can check this stack overflow link. more info
I too had a similar problem but solved the same with the following commands.
git checkout [BRANCH]
git branch master [BRANCH] -f
git checkout master
git push origin master -f
For more detailed description you can check this stack overflow link. more info
Hi, it is worked for me but I really don't know what happened, can you explain how it works? There is another problem: the merge that done by my team member before is already gone! and my branch is on the master now. Why this happened?
The reason is explained in the stack overflow link that I have given there.
"You probably downloaded the original source and added it to a completely new repo instead of cloning the original repo, right? Doing that will make it so that the history of your repo will be completely different from the history of the original repo, since your new repo won't have any of the same commits with the same sha IDs."
For me this is exactly what happened. What my code is doing is deleting the entire branch from remote repo and adding a copy of your local files to remote repo. That is why your team members changes are gone now.
Looking back at my solution I dont think it is a good one. Next time you can use git clone command to download the repo and this error wont be happening. If you want to go back to the previous commits to get your team members changes you can always use git reset command to do rollback. :)
The reason is explained in the stack overflow link that I have given there.
"You probably downloaded the original source and added it to a completely new repo instead of cloning the original repo, right? Doing that will make it so that the history of your repo will be completely different from the history of the original repo, since your new repo won't have any of the same commits with the same sha IDs."
For me this is exactly what happened. What my code is doing is deleting the entire branch from remote repo and adding a copy of your local files to remote repo. That is why your team members changes are gone now.
Looking back at my solution I dont think it is a good one. Next time you can use git clone command to download the repo and this error wont be happening. If you want to go back to the previous commits to get your team members changes you can always use git reset command to do rollback. :)
Thank you, I got it.
My collaborator forked my repo and has this issue "there is nothing to compare" how can we handle this?
And we don't want to erase non of our commits
@cmirrop Make sure you are comparing branches correctly. It should say "Base: master" and "Compare:".