exporting a project in rubymine - ruby

I've created a project and now want to export it to another folder so I can do work on it. The project itself is a repository so thats why I don't just want to copy and paste the files (since I'll get the hidden .git files with it).
Is there a simple way to export a project in rubymine?

If you use GitHub you could push all current files to your repo, then (assuming you are on a *nix command line) mkdir and/or cd into the NEW folder that you want to work in. You could then perform a:
$ git clone git#github.com:username/projectyouwanttomove.git
Let me know if that helps or not.

Related

Not able to build ROS package with catkin_make. Confused by package tree

I'm looking to run the main.launch stored in vehicle/launch/ from this github page
https://github.com/aureliopuebla/vehicle
I am very new at using ROS and have been learning, however I can't seem to be able to build these files.
If I try to use catkin_make on the parent folder it says that there is no existing 'src' folder.
If I go into the /vehicle folder there is a 'src' folder, but if I try to run catkin_make there, then it says that I have to run it at the root of the workspace. Which has me a bit stumped.
I have also tried to just run 'cmake ..', then 'make', and then 'sudo make install' in the /vehicle folder, but that just fills the /vehicle folder with copies of the other folders in the parent folder.
The reason why I want to build these packages is to be able to run the 'main.launch' file inside the '/vehicle/launch' folder with roslaunch, but it keeps saying that it can't find the other packages, no matter what I do.
Ready to clear up any questions. Thanks for the help.
the CMakeLists.txt in the folder is the top-level CMakeLists. So You need to make this src folder yourself.
Just do the following:
$ mkdir -p vehicle_ws && cd vehicle_ws
$ git clone https://github.com/aureliopuebla/vehicle.git
$ mv vehicle src
$ catkin_make
This way it should work. Just leave out mkdir -p vehicle_ws, if you already created a workspace and instead just cd into it.

Cannot PUSH recent commits to Github that have been pushed to Bitbucket

I have two remote repositories. One is private (Bitbucket) and the other public (Github). I had been pushing changes to Bitbucket using Github app and then pushing the same commit to Github repo using Xcode. However, recently I have been unable to PUSH the commits to Github and using SourceTree I get this error message:
This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.
This is how it looks from within SourceTree:
How can I get my Github repo to accept the most recent commits?
You have a pre-push hook which is telling you that you have git-lfs (large file support) enabled for this repository, but that it can't find the git-lfs program on your computer. The solution is to either remove the hook (which is located in .git/hooks/pre-push, as the error message says), or to fix your PATH so that it can find the git-lfs program.
It would have been enough to say that the .git directory is in the original local directory of your repository and you probably need a program like TextWrangler or similar, that shows the hidden files starting with a dot, to be able to see it and delete it by moving it to the trash (right click mouse). It took me one hour to figure out this. I hope no one else have to waste that time.
Here is the instructions for removing the pre-push file using Mac Terminal:
First: cd to the directory that is your local repository for your project. (The main folder that holds .xcodeproj and other files) The .git file is hidden but you can still access it by typing cd .git/hooks in terminal. If you type ls in terminal to view all files within the current directory, you'll notice the pre-push file. Type rm pre-push to remove the file. You should now be able to push to your remote repository. Just be sure to cd .. back a few times to your local directory for your project. Simple as that.

Undo a git clean command?

I just used a "git clean" command and managed to delete my Documents, Music, and other directories. Is there a way to undo this and somehow get those files back? I did this via Terminal on Mac. Time Machine isn't setup either.
I'm afraid those files are gone. git clean is not reversible since those files were not tracked by git.
From the comments it looks like you had your home folder as git repo, but with nothing tracked.
Running git clean -f removed any file inside the home folder (included the one in the subdirectories), leaving only empty subdirectories (the -d option is required for removing them too).
I'm sorry to inform you that you definitely wiped out your whole home directory. Next time you run a git clean use the -n options to perform a dry run and check what's going to happen before it's too late.
Unfortunately git clean removes all the untracked files, meaning the files that are deleted are not able to be recovered using git. You might be able to check your trash to see if the files still exist there.

How to restore version control in XCode?

I have just recently backed-up my XCode C++ project on my pendrive, using
rsync -avu
Since then, the version control for my project is grayed-out on every files, I can modify the files and not see the "M" nor the "A" sign. The only files still having version-control working "shared" files for which it works correctly. (Those shared files belong to a different project called "Shared").
I have tried git commit -m, git add . and even git init where the files were. Nothing worked.
Can you please help restoring version control for my project?
UPDATE:
Answers for the questions in commens (and answers):
my git repository is on my local hard drive.
I went to the Organiser-repository pane in XCode and I see my recent git commit -m "sth" as "sth" az a commit. I have a single branch: master.
Im not sure what command would be good to test git, as my commits work (theoretically).
I have a folder named .git in the project folder.
git log is working, showing the same as XCode Organiser-repository pane.
I think the XCode just can't synchronise with the git for some reason, and I don't know how to correct that.
First off, this is not an answer that will fix your problem, I just try to provide some help that might get you closer to a diagnosis.
Git stores its files in a folder named .git. Check if this folder is present in your project. If it's not then your Git repository is gone.
Next, try some basic command such as git log. For this to work, you must first cd to your project folder (or a subfolder thereof), because whenever you run a Git command it will look for the .git folder in the cwd or a parent folder. If git log does not work then your Git repository is broken in some way. Someone else will have to step in to further diagnose the problem, as I am no expert on this subject.
Finally, you should also check whether your rsync command has really sync'ed your project's .git folder with the backup's .git folder. Use this command:
diff -rq /path/to/project/.git /path/to/backup/.git
If there is no difference (as I would expect if rsync has worked correctly) then the problem with your Git repository is both in your project and in your backup. If there are differences then it might be worthwile to try your next steps on a copy of the backup (it should be fine to make the copy in the Finder).
Good luck.

How do I make an 'ftp-style' link in bash to the most recent subdirectory or file in a directory?

I am currently working on a programming project where I have my revisions of a Python module stored in dated directories, that is, I keep every day's revision separate, like a git repository on my laptop. For instance, today's hierarchy is .../workingdirs/12-28-11/fingerpuppet/, where fingerpuppet is my module's directory. How do I make a permanent symbolic or hard link in BASH to the most recent revision, such that it changes its target automatically to say, .../workingdirs/12-29-11/ tomorrow, without my having to change it manually? I've seen what appear to be such links on ftp servers, where there is a 'current' link to the most recent version of a file, but I don't know if that is automatically updated or done so manually.
First thing: have you considered using git or some other vcs for your project? It seems like that would make things easier.
If you'd rather not for some reason, another option would be to set a nightly cron job to create a new directory with today's date, copy all the files over from yesterday, and reset the link to latest to the new directory.
unlink current
ln -s ../workingdirs/$(date +%m-%d-%y) current
Instead of creating these symlinks every day, you can setup an alias to change to the most current directory. Add this to your ~/.bashrc:
alias myprj='cd /absolute/path/to/workingdirs/`date "+%m-%d-%y"`/fingerpuppet'
You can invoke that alias every time you need to change to that directory:
$ myprj

Resources