Yesterday, I decided I wanted to upload all of my old crappy work. It is back when I was just starting programming and just wanted to show people it. I have never used git (very bad decision in my part) and created a repository. I downloaded the windows client and the egit eclipse plugin. I used the egit plugin but it just moved everything to a Oder and made it a local repository. I then used the windows client to submit a commit. It was taking a while so I left it on and went to sleep. I woke up this morning and everything was deleted except the folder names, .gitignore files and .project files from eclipse. Is there anyway I can get this old work back.
Thanks!
At the root folder of your project, run gitk from the Git Bash and you'll see your changes.
I have found a solution here: https://www.quora.com/Git-revision-control/How-do-I-retrieve-added-files-but-not-committed-from-a-reset?share=1
Basically you can retrieve the files from blobs but you have to do this one by one. I am writing a program to do so automatically now.
Is there any other easier way though?
If so, I would be glad to know.
Edit: Oh my I completely forgot about the previous versions tab on Windows. I'm just doing that.
Thanks!
Related
Today GitHub for Windows has suddenly forgotten all repositories on my pc. Has anyone seen anything like this? (It is the latest version, running on Win7 pro.)
It turned out to be a bug in GitHub for Windows. At the moment I do not have more details, but I have information about how to fix it if someone else needs that. (I hope the problem will soon be gone.)
Update: To avoid confusion I add the info I got here:
To resolve this, you can go to %LocalAppData%\GitHub and delete the cache.db file located there. GitHub for Windows will recreate that file, and this should get things working again. You'll need to add your repositories again, though. You can drag-and-drop them in, or use the 'scan for repositories' button in the options menu.
Just dragging the folders from explorer to the Github window will add them back.
I came in today and saw a bunch of sources listed as
filename.pl 1.1 1.1
instead of
filename.pl 1.1
in my Eclipse project Navigator.
Trying to commit it gives me, for example:
cvs commit: sticky tag '1.1' for file 'filename.pl' is not a branch
Without resorting to swearing and smashing my work desk, how can I get rid of the sticky tags, I dont think I want to branch every bloody source file when I have to do commits, we're not using version control for any real project management, just to sync between devs, and certainly dont have time to do CVS/SVN/what-have-you maintenance every bleeding month.
Was CVS configured to resort to this ball ache by default? Can it be reverted?
I don't care if it has to be wiped and redone it's a recent deployment anyway, any and all suggestions much welcome!
EDIT I have now noticed that on another machine configured with my CVS username it is proper and I see only untagged sources, how can I do this for my Eclipse, described above? I will also check whether I have those files listed as binary or ascii on both machines.
Find all files with the name "Entries". Find in files the text "//T". It will be files with "stycky revision"
example
/ NodeFinder.java/1.6/Tue Nov 12 05:23:32 2013//
/ OrHtmlGenerator.java/1.103/Wed Dec 4 09:22:02 2013//T1.103
/ PopupTextSearchWindow.java/1.3/Mon Oct 15 11:07:27 2012//
/ PropertyListener.java/1.1/Tue Sep 29 12:57:38 2009//
Believe I had the same problem. It drove me crazy as I couldn't see what caused it or why it started.
In eclipse open Preferences... and then select:
Team > CVS > Ext Connection Method
Change from "Use an external program to connect" to "Use another connection method to connect".
I have a (bad) habit of sometimes clicking the Restore Defaults button or random preferences sections. I probably did that, forgot about it and had that annoying problem for weeks.
I'm a Mac user. That may be part of the problem. Don't know if the external program is configured the same on all platforms (or even exists).
In Eclipse Preferences > Team > File Contents on the machine in question I had .cgi set as binary and on my home setup the default, ASCII, for .cgi files, as soon as I checked some sources from my home setup the machine in question recognised next time I tried to update that the files are completely different now and were locked with that sticky label.
To restore it I had to remove the whole project, disconnect, delete CVS metadata, change my settings to ASCII for .cgi and checkout again from the repo, solid as a rock since.
We have two developers working on the same project. This project is integrated with Git.
When one developer is working on the project and other developer tries to run the project, Xcode 4 crashes as shown.
What could be wrong and how to rectify it?
Thanks!
I think what has happened is that your project.pbxproj file has gone some merge conflict stuff embedded in it. Open it in a text editor and look for lines like:
>>>>>>>
If you see that, it means you need to clean up the file.
There's no way for git to be doing anything across systems while both developers are just working, so the issue is something someone checked in...
Another issue is that if a project file is changed by another developer, and someone pulls the changes with the project open, they have to re-open the project to see all of the targets as they are meant to be used in the project. I have not seen that cause a crash though.
I recently switched my development workstation from Windows to Linux (Fedora64). I use Eclipse with PDT and CVS for PHP programming. I copied my entire project folder, including the .project file to my Linux system and imported it in Eclipse. It automatically detected the CVS server IP and login. However, when I sync, it shows all my files (>8000) as outgoing, and moreover the sync is always stuck at 79%. How do I fix this without checking out the entire project from CVS again? Thanks.
This might be an issue with timestamps that are now slightly out-of-sync with the meta data recorded in the hidden ./CVS folders of your working copy. Try running cvs status on your sandbox (sorry, I'm not familiar with Eclipse's CVS interface, but that's how you would do it on the command line). That should reset the supposedly modified files.
You also might get away with simply running Update. If all else fails, do a fresh Checkout.
Update: I googled a little and found some articles that can be interpreted to say that Eclipse does an implicit status when doing an "Update" or "Update Check".
I am setting up a project that will be shared among several programmers at my organization. We are using git--to which I am a newcomer. The project directory includes symbolic links to documentation directories that should not be under version control. I want to maintain the symlinks under version control as symlinks, rather than having them dereferenced and all of the content of the symlinked directory placed under version control.
I find that the git command line tool behave the way I want: git add -A. However if I try to use the Eclipse version of git, eGit, to add all the currently unversioned files, using Team->Track on the project context menu, eGit wants to add every file in the symlinked directories. Is there a way to tell eGit that, no, these are really symlinks, and should not be dereferenced?
Our problem was discussed in this: Eclipse Community Forums Thread
It looks like currently the Linux native lstat support is not too easy to make portable. The Least Common Denominator paradigm that they have for programming Eclipse in Java make it harder to do Linux or Mac native stuff. (read: *cough* Windows doesn't support symlinks *cough*).
The good news is:
It seems possible, but they'd need to code it in a way that complies to their 'Write Once Test Everywhere' programming standards. I feel that it's important to have some native stat and lstat support on Linux when using EGit because of this problem, as well as Eclipse bug #346079.
Simply having EGit installed causes slowdowns & IDE freezes when doing a Git Refresh :-(
The bad news is:
These two bugs are stopping me from using EGit for the majority of my git commands. The user experience makes EGit unusable for me. It would be really nice to be able to use EGit within Eclipse so that Mylyn User Stories & Tasks could be tied to feature branches automatically. It would also be great to have the automatic commit message template features. This would make putting the current task & status in the commit message a breeze.
This is bugging me almost enough that I'm ready to see if it's possible to make some scripts to query Eclipse / Mylyn for the current commit message template output, and do the git commit from the commandline using this. I'm not sure how automatic per-user-story feature branch creation would work though.
Until these problems get fixed, I'm sure a lot of EGit users will not be happy :-(
We suffered from this problem cluttering up the commit screen no end, and occasionally causing someone to forget to include a file they had created.
The solution we came up with was to manually edit the .gitignore files to include the paths where the linked files would appear when the symlinks were dereferenced:
/ProjectHomeFolder/.gitignore
Since we were working in the Play Framework we also edited the following ignores:
/ProjectHomeFolder/conf/.gitignore
/ProjectHomeFolder/public/.gitignore
We simply added
/ModuleName for each of the modules that were symlinked and now egit ignores them properly, for completeness here is the full contents of my root .gitignore file, that sits in the root directory of the project:
/.project
/.classpath
/.gitignore
/eclipse
/tmp
/crud
/.git
/.settings
/modules
/conf
/betterlogs-1.0
/chronostamp-0.1
/logisimayml-1.5
/betterlogs-1.0
/sass-1.1
/deadbolt-1.4.2
/jquery-1.0
/log4play-0.5
/messages-1.1.1
/navigation-0.1
/jqueryui-1.0
/scaffold-0.1
/table-1.2
/tabularasa-0.2