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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:47:03+00:00 2026-06-13T21:47:03+00:00

My question is perhaps very basic, but how do I edit a specific file

  • 0

My question is perhaps very basic, but how do I edit a specific file from a version commit (whose author is a colleague working on the same remote repo as me) from which I know the SHA ?

  • 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-13T21:47:04+00:00Added an answer on June 13, 2026 at 9:47 pm

    If what you want is to get the content of the file, you can do

     git show someHash:pathToFile
    

    If you want to see the differences between current version of the file with the one of the commit, you may do

     git diff someHash pathToFile
    

    If you want to replace current version of the file with the one of the commit, you may do

     git reset --hard someHash pathToFile
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is perhaps a very simple question but the help file doesn't seem to
Perhaps this is a very basic question, please pardon me if it is ---
Disclaimer : This is a very basic question, but keep in mind I come
Disclosure This is a general question, perhaps without a specific answer, but it is
Perhaps this question has been asked elsewhere, but I'm unable to find it. With
I have an ObjectDataSource (but perhaps this question is the same for all kinds
OK, this is perhaps stupidest question ever but bear with me.... How to make
perhaps a simple question, but we are discussing about whether it better to use
Perhaps it is a dumb question but I am confused with the following: Are
This is perhaps more of a discussion question, but I thought stackoverflow could be

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.