XCode 4.3.2 - How to change repositories - xcode4

My project is currently stored on a remote SVN server. I need to move that project to a BitBucket git server. I've already added the repository to XCode but how do I move the project over?

Not entirely sure if this is the correct way to do it, but here's how I accomplished it:
You can either copy the project to a new location or update the existing project. I choose to make a copy. I also went ahead and moved the projects to the local path for the new repo.
In Xcode - Open the Project and go to File - Source Control - Hide Remote Status
The go to File - Source Control - Repositories and remove the SVN repo.
Close the project
Using Terminal, show all hidden files.
Using Finder, go to the project directory and remove all of the .svn files (include those bundled in the project file. (There has to be a better way to do this step)
I committed the cleaned project and files to the new repo.
Open the project in Xcode.
Xcode should have already picked up on the new repo and you should be ready to go.
RE: (There has to be a better way to do this step)
Open Terminal
Navigate to the root of your local working copy
At the terminal command prompt, enter: find . -type d -name '.svn' -print -exec rm -rf {} \;
Hit enter to delete all '.svn' folders in and below the working copy directory

Related

How to fix "warning: could not open directory" after "git add ." command on Mac OS X Maverick

I'm new to R and RStudio and am currently taking online classes to learn more about data science. In one of my lectures, I'm being asked to create a project in RStudio prior to creating a repository in github and linking the project with git. In order to make a pre-existing project interact with git, the instructions in my lecture are telling me to navigate to the directory containing my project file by using the "cd" command followed by the location of the file and file name. My project file is currently located on my desktop so I typed in "cd ~ /Desktop/temporary_no_version_control" however, the directory doesn't seem to change and remains set on the original location of the file which was in Users/savannahkeiffer. Just so I could complete the assignment, I re-located the file to my user file and tried to follow the rest of the instructions which told me to type "git init" followed by "git add ." which is where I run into the "warning: could not open directory" warning.
I have a macbook which runs on OS X Maverick. I went into my system preferences > security and privacy and selected Full Disk Access where I manually allowed terminal to have access to all the files on my laptop. However, after closing and re-opening RStudio and attempting the commands again, I got the same error.
This is what I entered when I tried to change the directory
Savannahs-MacBook-Air-2:~ savannahkeiffer$ cd ~
/Desktop/temporary_no_version_control
Savannahs-MacBook-Air-2:~ savannahkeiffer$ git init
Reinitialized existing Git repository in
/Users/savannahkeiffer/.git/
And what I got when I changed the location of the project on my laptop in order to complete the assignment (after already giving access to terminal)
Savannahs-MacBook-Air-2:~ savannahkeiffer$ cd ~
/Users/savannahkeiffer/first project/temporary_no_version_control
Savannahs-MacBook-Air-2:~ savannahkeiffer$ git init
Reinitialized existing Git repository in
/Users/savannahkeiffer/.git/
Savannahs-MacBook-Air-2:~ savannahkeiffer$ git add .
warning: could not open directory 'Pictures/Photos
Library.photoslibrary/': Operation not permitted
warning: could not open directory 'Library/Application
Support/MobileSync/': Operation not permitted
warning: could not open directory 'Library/Application
Support/CallHistoryTransactions/': Operation not permitted
warning: could not open directory 'Library/Application
Support/com.apple.TCC/': Operation not permitted
warning: could not open directory 'Library/Application
Support/AddressBook/': Operation not permitted
And so on.. Is this a directory problem or a "git add ." command problem?
It looks like what happened is that when you typed the cd command, you left a space in between the tilde and the rest of the path, so you changed back into your home directory (represented by the tilde). Then, when you tried to do a git init, you tried to initialize your home directory as a Git repository, and then ran into the fact that macOS restricts some programs (in your case, not Terminal, but maybe still Git) from accessing certain directories.
In the shell, the tilde is just a fancy way of spelling the environment variable $HOME, which points to your home directory (in this case, /Users/savannahkeiffer), so it should immediately precede the rest of the path without a space in between.
The best thing to do in this case is switch into your project directory and then initialize a repository there:
cd ~/Desktop/temporary_no_version_control # note the lack of space after the tilde
git init
If you didn't intend for your home directory to be a repository (i.e., you're not storing your dotfiles in a repository there), then you will probably also want to remove the .git directory from your home directory by running rm -fr ~/.git. Be careful when typing this, as rm removes data without prompting and an unfortunate space could result in all your data being deleted.
Hello this was an issue I had also but in Windows. It was a simple fix, user error. I hadn't used gitbash for awhile so I forgot the process with working in gitbash. First mistake I made was after opening gitbash I directly executed the git status command. That's when I got the "warning: could not open the directory" message. You need to using the cd (change directory) command and the dir (directory) command to navigate to the folder that has the files you want to "git add ." and "git commit -m". Once you get to that folder you will be able to use the "git status" command to see your changes then proceed as normal. I had to post this because it took me hours before I realized what I was doing wrong. No other stack post pointed this obvious user mistake. Hope it helps you.

Bitbucket not showing changes in themes directory

I'm using Sourcetree on OS X. I'm working on a WordPress project. For some reason, changes I make in the 'themes' directory are not being shown as Unstaged files. If I add a test file to /wp-admin/ or /wp-content/ it shows the test file as unstaged. I can't figure out why themes files are not being tracked.
I checked .gitignore and it's empty.
Any help is appreciated. Thanks!
To clarify the question. If SourceTree fails to recognize un-tracked files here are some steps you should take.
Double check that you are not listing the file/directory in .gitignore
Open up a GIT console for that repository and run git status This should show whether any changes are detectable by GIT.
Go to the directory in which you are having problems and look to see if you have any .gitignore files or .git folders. If they exist then deleting them should allow you to add these files to your repository
Caution:
Sometimes having a Repo inside a repo is by design (often referred to as a sub-repository) and could cause issues if removed.
Edit:
I just replicated this scenario with two repos and source tree appeared to see the untracked files once the .git was removed.
Could you open up a terminal window to that themes directory and do an ls -a?
If you use SourceTree, open the terminal and use git add <fileName> -f to force shown any changes in this folder then you can push to Bitbucket

How to share/transfer an Atom installation (packages and settings) from one Mac to another?

Is it possible to copy Atom from one Mac to another, including all installed packages, settings etc?
There are several ways to synchronize your settings and packages between Atom installations:
Git: Create a public or private Git repo and store the contents of your local ~/.atom folder in there. Ignore the following files/directories in a .gitignore file:
storage
compile-cache
dev
.npm
.node-gyp
Use a package like sync-settings. This will store your configuration in a GitHub Gist.
Dropbox (or similar): Move your ~/.atom folder to your Dropbox folder and then symlink it from there to its original location. This has the downside of syncing everything in ~/.atom, even the things you could ignore.
Use stars to select your favorite packages. On the Atom web site, create an account and mark your favorite packages with stars. Then use apm stars --install to install all starred packages on any machine. Downside: This only works for packages, not for settings.
More details:
https://discuss.atom.io/t/syncing-settings-packages-between-machines/1385
As a user who uses a dotfile management system such as RCM, I prefer independent config files.
For now, Atom doesn't officially provide a packages.cson file to manage plugins, but as the post Syncing settings & packages between machines mentioned, there is a plugin called package-sync that will generate a packages.cson file for us.
So with the help of package-sync, now I can just sync those mininal config files to have my Atom settings and packages consistent across multiple machines.
This is how to do it (Use ubuntu as an example):
Install Atom, and install package-sync through Edit-->Preferences-->Install as the screen shot shows:
Open your command pallete and type: Create Package List and there will be a packages.cson file under your ~/.atom folder.
Edit the gitignore file:
$ gedit ~/.atom/.gitignore
Make sure the content is:
blob-store
compile-cache
dev
storage
.node-gyp
.npm
.apm
packages/
atom-shell/
This is a screenshot of the .gitignore file:
This makes sure the content downloaded by Atom from the Internet will not get synced to your dotfiles repo.
Move the .atom folder to the dotfile repo:
$ mv ~/.atom ~/dotfiles/tag-atom/atom
Relink the folder:
$ ln -s ~/dotfiles/tag-atom/atom ~/.atom
Or if you have rcm installed:
$ rcup
Now go to another machine, and install Atom and package sync. Update your dotfiles repo, and then Open your Atom command pallete and type: sync
Now your Atom settings will get synced and integrated with the RCM dotilfe management system.
This is the files in my ~/.atom folder that get synced:
I recently built a package that syncs automatically your Atom settings and packages across multiple computers. A little bit like the bookmark synchronization mechanism in Google Chrome. It's called atom-package-sync. Maybe it could fit your needs.
You can sync your packages via package-list.txt file and a simple shell script.
Create the package-list.txt file
apm list --installed --bare > package-list.txt
Install missing packages on another host
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INSTALLEd_PKGS=$(apm list --installed --bare)
for PKG in $(cut -f1 -d# $BASEDIR/package-list.txt); do
grep -q $PKG <<< $INSTALLEd_PKGS || apm install $PKG
done
The .atom folder contains the packages folder, which can be rather huge. Unfortunately OneDrive doesn't allow you to exclude folders, so I went with a git option.
I excluded the packages from git and instead I committed a text file containing my packages (my-packages.txt).
To re-install packages I need to run: apm install --packages-file my-packages.txt.
To generate the my-packages.txt, I need something like this on a Bash shell: ls packages | xargs -n 1 echo | cut -d/ -f1 > my-packages.txt
I sync my Atom settings between Windows, macOS, and Linux machines using Resilio Sync Home. It is free and the files are not saved on the "cloud" (like Dropbox or Gists), but it requires that, at least, two machines are online in order to sync the current settings.
I do not want to sync caches, installation specific settings, et al., I update the .sync/IgnoreList file that is created in the synced directory (i.e., the ~/.atom directory). Unfortunately, you will have to update this on each machine that you sync (ironically, the IgnoreList file is not synced). By default, the file specifies various temporary files to be omitted from syncing, so you'll need to add the following:
## Atom-specific
/packages/node-debugger/debugger.log
\packages\node-debugger\debugger.log
/.apm
\.apm
/.node-gyp
\.node-gyp
/.npm
\.npm
/blob-store
\blob-store
/compile-cache
\compile-cache
/dev
\dev
/recovery
\recovery
/split-diff
\split-diff
/storage
\storage
Some of the omitted directories are package-specific (e.g., split-diff). Because Windows has different path delimiters than other platforms, I need to specify both(!!)
Install Resilio Sync Home on your first machine
Add the .atom directory to Resilio to be synced.
Update its IgnoreList file, as shown above. Save this file for the other machines you want to sync with.
Send a Resilio "Read & Write" link of that folder to the other machines you want to sync with or copy the "Read & Write" key to be used on the other machines. To do this, in Resilio's folder view, click on the .atom folder's menu (vertical dots on the right edge) and select "Copy Read & Write key". Save it for later.
Then on your other machines,
Install Resilio Sync Home
Create .atom/.sync
Copy the IgnoreList from your first machine to that directory
Add the .atom directory to be synced with the other machine. You should add the folder using "Enter key or link," then enter the key you copyed, above.
Wait until syncing is done before opening Atom. The first time will may take a few minutes.
Now I don't need to go around installing/removing packages on every machine, separately!
FYI: Changes to files and directories are saved in .sync/Archive, for some period of time, if you should need to recover them.

How can I clone / create a copy of my local meteor app?

How can I create a copy of my entire local meteor application? I was expecting a command like "meteor clone myapp" but couldn't find any documentation and simply copying the folder doesn't work.
You could use git to clone the whole thing.
If you aren't familiar with git see this reference. http://gitref.org/creating/
In windows, you can copy and paste the entire project directory and go into .meteor/local directory and delete everything in that directory except the db directory. Then start the meteor server on the new project directory, with everything deleted in the .meteor/local directory, meteor will rebuild the project without altering the logic of your application.

How to deploy html5 boilerplate publish folder ( probably using git-ftp )

I am still searching for a good development -> deployment workflow (mostly for smaller websites) using html5 boilerplate + build script, gitHub, and probably git-ftp.
The problem is I can’t figure out a cool way of how to deploy the publish folder of html5 boilerplate to my webserver (where I normally have no ssh access)
How do you do it?
What if the website uses a CMS like redaxo?
Just use git-ftp in the "publish" folder:
Make a git repository out of the "publish" folder
cd publish
git init
git add .
git commit -m "This is now a git repo"
Configure git-ftp in publish/.git/config, then use:
git ftp init
use the syncroot option of git-ftp to specify the directory to sync from as if it were the git project root path. In .git/config under [git-ftp] add
syncroot = publish/

Resources