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 8738927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:50:17+00:00 2026-06-13T10:50:17+00:00

Say I have a branch work and a branch ideas in my git repository.

  • 0

Say I have a branch “work” and a branch “ideas” in my git repository.

I usually work on my marvelous_file.cpp in “work” branch, but sometimes I would like to open
at the same time the marvelous_file.cpp that is in my “ideas” branch.

I don’t want to see what the differences between the two files, but rather take snippets of codes from the “ideas” branch and copy and past them in the file in the “work” branch.

Is this possible? If not, can I checkout the file in “ideas” into “work”, but with a different name?

  • 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-06-13T10:50:17+00:00Added an answer on June 13, 2026 at 10:50 am

    You can use git show to do that:

    git show ideas:marvelous_file.cpp
    

    This will show it right in the Terminal. If you want that as a file, just pipe it into a file, e.g.:

    git show ideas:marvelous_file.cpp > ideas.cpp
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a project in a git repository. The project has a branch
So say I have my master branch, and I create feature-x branch to work
Say you have a scenario with a central master git repository, which developers and
I'm unclear on a basic principle of how Git branches work. Say I have
I have a local branch for day-to-day dev work in git. My workflow is:
Lets say we have release branch called v1.0. The work in trunk continues (developing
Let's say I have a develop branch. I create a feature branch from this
Lets say I have the following two branches and the local branch is 'mybranch'
Let us say I have a trunk and I create a branch (branch A)
Say we have deep hashes like: b = {1 => {2 => {} },

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.