LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-24-2018, 12:57 PM   #1
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205

Rep: Reputation: 13
unable to git fetch


I created a local repository and command ls -al shows it is .git. I edited a file and want to revert back to the original. The edited version of the file was renamed leaving no file of that name in the directory. I tried these two commands along with some others.

Code:
git fetch .git parser.odt
Code:
git fetch ./.git parser.odt
The response is
Quote:
fatal: Couldn't find remote ref parser.odt
fatal: The remote end hung up unexpectedly
the file was added some days ago with

Code:
git add parser.odt
git commit
The git commit started a vi editor where I edited in comments and saved with ctl-ZZ

What must be changed to get a copy of that file?

EDIT: I am looking at: git --help and the most commonly used commands do not include any command to show what is in the repository. How is that done to ensure that the files were really saved?

Last edited by bkelly; 07-24-2018 at 01:08 PM.
 
Old 07-24-2018, 05:34 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,153

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
try
Code:
git checkout FILENAME
 
Old 07-26-2018, 03:02 PM   #3
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 205

Original Poster
Rep: Reputation: 13
Checkout works. But, I don't really want to check it out for editing. I just want a copy of it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba:Unable to fetch machine password hjl Linux - Software 1 01-17-2014 08:56 AM
[SOLVED] Unable to fetch netvault report for client smilemukul Linux - Newbie 1 10-02-2012 12:46 AM
openLDap server unable to fetch user details parkarnoor Linux - Newbie 3 07-22-2012 02:51 PM
unable to fetch archives kirthika Linux - Server 3 08-03-2011 03:05 AM
user unable to fetch mail gmitchell Linux - Networking 3 12-17-2004 03:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration