Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMichelle Wallace
2,376 PointsCopying in GitBash = lost file, please help.
I have been trying out commands in GitBash. After following the console foundations videos. So just the basics of moving around and file renaming etc. However I have tied to copy a file and it's disappeared? When I do "ls" on my folder the file I wished to move around was showing fine within the directory.
Inside my Training Resource Folder.I did the following:
Then I did
- mv training.txt /"Week 6 - Starting Work"
To move my "training.txt" file to this folder
then still inside my training resource folder I did the following:
- cp training.txt train.txt
I got back this error: " cannot stat 'training.txt': No such file or directory.
I assumed this was because I was still inside my training resource folder and I should have gone to my "week 6" folder where it was meant to be moved to in step 1.
I ran another "ls" on the training resource folder and indeed it was not present, like it had moved so I moved my start point to match. However still no file in "Week 6 - Starting Work"
So my question is can I get it back and how do I stop it from disappearing next time? The file is not important it was a test file but obviously I would like to understand what happened so I don't make the same mistake again.
I have also navigated from the desktop outside GitBash and the file is in neither folder and I have carried out a search on all files to no avail.
Thanks