Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3600102
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:27:08+00:00 2026-05-18T20:27:08+00:00

My master GIT branch seams to have some errors thus I’d like to recheck,

  • 0

My master GIT branch seams to have some errors thus I’d like to recheck, re-merge or possibly clone my dev branch over the master branch so the master branch would be a copy of dev.

How can I do that?
Thx.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:27:09+00:00Added an answer on May 18, 2026 at 8:27 pm

    If the problem is simply that your checked-out files don’t match up with the branch, just use git reset normally:

    git reset --hard HEAD
    

    That should be all you need. However, if you still want to overwrite master with dev, read on.


    If you want to overwrite your master branch with the contents of your dev branch, use git reset like so:

    $ git checkout master
    $ git reset --hard dev
    

    And then if you want to push this somewhere else:

    $ git push origin master
    

    Note that if your dev branch doesn’t fast-forward from your master branch (which I’m guessing it won’t, since you said that your master branch has some screwed up stuff in it), you’ll need to add the --force flag to the push to overwrite it on a remote:

    $ git push origin master --force
    

    Note, however, that this can involve all of the normal caveats of rewriting history a la git rebase – if anyone else uses this remote, they’ll need to deal with the equivalent of an upstream rebase.


    To avoid this problem in the future, advise your friend that using --force is almost never necessary. If they’re getting conflicts when they try to git push, they should git pull first, resolve the conflicts, and then git push.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The structures of my Git repositories look like this: A-B-C-D-E-F # master branch in
Here's an example: >git status # On branch master nothing to commit (working directory
I am working on a git repository with a master branch and another the
Say I have a git repository and I've been working on master, can I
When I'm on master, I only have to type 'git push' to push commits
My master page contains a list as shown here. What I'd like to do
I'm running a master-slave MySQL binary log replication system (phew!) that, for some data,
I have a master-detail scenario where I have 1 ComboBox listing companies from an
Master table contains ID and PersonName. Course table contains ID, CourseName. Detail table contains
What would be the Master Pages equivalent in the Java web development world? I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.