You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I created a new branch called aws.
I am trying to merge it into master (which is my main branch)
I have tried to do git checkout master
git merge aws
It tells me it's "Already up to date"
I then tried git checkout master
git reset --hard master
I keep reading suggestions and I am not making any progress.
Hi, @jim.hoitela, welcome to the community!
"Already up to date" means there are no new commits on the new branch aws that are already within the master.
Could you please diff the branches to confirm the output? You can run the following command to do that:
git diff master..aws
If there's no output, that means you simply need to check out aws again, commit the changes you made and confirm that running git diff master..aws actually yields a result. Then you can checkout master and merge.
In case it doesn’t work, could you please try to pull from the specific remote branch
git pull origin master
Then try to push changes to that remote branch
git push origin master
Looking forward to hearing from you.
Thanks. And thanks so much for your response.
I did the
git diff master..aws
and it didn't return any result. I update one file and then did it again and I then I get output.
I then tried to merge aws. It seemed to work but when I looked into the actual repository online none of the updates done in the aws branch were merged.
I did try to do a pull from the remote branch - aws and then tried to push the changes into the main branch and it's not working.
Hi @jim.hoitela, thanks for getting back to us!
You mentioned that:
"It seemed to work but when I looked into the actual repository online none of the updates done in the aws branch were merged"
So I would like to understand if you pushed your local changes to your remote repository after changing it locally.
The reason I'm asking this is that in order for your remote branches to have the same content as your local branches, you need to push the local changes to your remote repository. Maybe this Git tutorial helps you in this case:
Please let me know if it helps and feel free to share any additional questions regarding this case.