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

  • SEARCH
  • Home
  • 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 7057447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:59:14+00:00 2026-05-28T03:59:14+00:00

I checked out a new branch my_branch from master to create a new feature

  • 0

I checked out a new branch my_branch from master to create a new feature for my app, but I break another feature while doing it.

I don’t want to delete changes in my_branch but want to go back to master to see the original state of broken feature. Then, I want to go back to my_branch again.

How should I do this?

Thank you.

  • 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-28T03:59:14+00:00Added an answer on May 28, 2026 at 3:59 am

    1) You can git stash and go back to master see and come back and git stash pop

    2) You can do git show master:path/to/file and see the file / directory ( this if you want to see the contents )

    3) You can always just commit, change branch and come back and git reset HEAD~

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

Sidebar

Related Questions

I just checked out a revision from Subversion to a new folder. Opened the
I checked out a project from TFS I had worked on a while ago,
I've checked out a new branch to install a gem that I often have
I created a new CVS branch, checked it out and addded some folder and
I have checked out a specific Subversion branch of my app. Call it '1.0'.
I checked out a Play application from SVN onto our Ubuntu production server. I've
I recently checked out a large C# code base that I will be doing
I have a branch checked out in Tortoise 1.4.2, edited it in 1.6.2 and
I have checked out from the main trunk and made some changes that I
Possible Duplicate: git push error '[remote rejected] master -> master (branch is currently checked

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.