Xcode project - sync remote repository from github to Mac - xcode

I am working on a project at work and would like to work on it at home as well. I synced the Xcode project to a remote repository to github from my work's mac. I am wondering how I can get a copy on my home's mac and sync it so that I will be able to push commits and pull?

A simple
git clone https://....yourRepositoriy/ongithub
You have to run this with git installed from the Terminal
Should work and copy all files to your local machine

Related

Git on Windows "error: refs/heads/v0.6.x does not point to a valid object!" after push of MacOs - MacOs still fine

I wanted to add MacOs support to my Java application. So I bought a new Mac with M1 Chip and created a new subbranch in my Git repository to add MacOs support. The repo is hosted on Dropbox. I have local repos on MacOs and Windows which point to this "remote" repo (Dropbox is added as folder in the home directory).
On MacOs: I used SourceTree to clone the repository. After I finished the first bugfix I pushed to the repo. I can still push and pull on master and the subbranch. No prob on MacOs.
On Windows: Since I pushed from MacOs I have the problem ONLY on Windows. I tried with TortoiseGit, SourceTree and directly on console with "git pull origin master". The result is always fine for the master branch (where I did not push from MacOs yet) but for the subbranch I always get "error: refs/heads/v0.6.x does not point to a valid object!". Doing "git fsck" gives only "dangling tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904". I removed the head branch locally and remotely. It is still there on MacOs but on Windows I get the same error message when I pull from the repo.
Additional Info: The folder refs\heads\v0.6.x exists. So I guess it is pretty sure a problem with the check-in from MacOs.
Any Ideas are very welcome.

xcode support TFS(Team Foundation Server) for version control on mac OS? & How to setup TFS on xcode?

My project just on my local no git or anyelse.
So can i use TFS with xcode on Mac OS? If yes, how to setup TFS on Xcode?
Thanks.
Yes, you can share your Xcode projects in TFS using both a Git repository and a TFVC repository.
Share your code in Git using Xcode:
Clone Git repository from TFS
Move your code into the local Git repository.
In Xcode, commit your changes locally.
Push your changes to your team project's repository.
Share your code in TFVC using Xcode:
Download and configure Git-tf
Add Git-tf and the Java runtime to your path.
Go to the root of your local repository.
To share your Git repository in TFS, configure the connection and check in your code.
After you commit changes to your local Git repository, and you're ready to share them in TFS, check them in.

Can we use the Github mac app with GitLab?

I like the GitHub Mac app, which I use with my GitHub account. I have joined a GitLab project and I was wondering whether I can use the GitHub app with a GitLab repository. I found a post that discuss that the Windows GitHub app works with GitLab and one that show how to add a repo. Both these posts gave me hope that the GitHub Mac App would work with GitLab. I also see that you can use BitBucket with the GitHub Mac app, but I don't understand whether and how to link a GitLab repository to my GitHub Mac app.
Many thanks!
With the mac app, you have to do the clone on the command line. Open a terminal, navigate to directory that you want to be the parent of your local repo, and git clone the repo. As soon as this is done, go into the github mac app and Go to File->Add Local Repo
You can then add the repo directory file picker, and from there you should be set. The first time you push back to origin through the app, it will ask for your gitlab username and password, and optionally store them in the keychain.
Here is the command in terminal (OSX) that worked for me to clone the repo:
git clone git#gitlab.com:yourusername/yourrepo.git
Hope this helps someone

When I clone a git repository, why does it not show up in GitHub for Mac?

I am trying to understand Git and GitHub for Mac.
Example: I try to clone the FacebookSDK git repo like this. In Terminal I write:
git clone git://github.com/facebook/facebook-ios-sdk.git [path to where you want to save sdk]
git successfully downloads and clones it and I find a folder called facebook-ios-sdk in the specified path.
However GitHub for Mac does not list this repository at all. What I don't understand about GitHub for mac anyway is how is it supposed to know about existing git repositories?
Where am I supposed to install/clone repositories to, so GitHub for Mac recognizes them?
You can tell GitHub for Mac about the repo you cloned in Terminal. But it's easiest to use the "Clone in Desktop" button to launch GitHub for Mac and start the clone. See working-with-repositories for more info.
That way, GitHub for Mac will automatically know about your new repo.
There is a "+" drop-down button in the bottom left of the GitHub for Mac's main window.
"Add Local Repository..." will tell the software about the existing repository you cloned down. "Create New Repository..." will clone new projects for you and ensure that they are tracked from the very beginning.
I think GitHub for Mac only allows you to clone repositories that you yourself created or forked. This is because the entire GitHub workflow is centered on forking, developing, and then requesting the upstream repo to pull your changes.
Here is how to do it:
Browse to the repo you want to work on and click on ⑂ Fork
Open GitHub for Mac
File / Reload Repositories, or ⌘R
File / Clone Repository, or click on the ✚ ▾ button and then on the Clone tab
You should be able to see your newly forked repo, select it and Clone Repository
There's also a 💻 Clone in Desktop button on the GitHub website (right side) but I could never get it to work. It just sends me to the download page for GitHub for Mac.

How do I download an Xcode project From SVN?

I have been given SVN access to a repository which is in the form of svn://xxx/repo-name/trunk
How do I download the source code onto my local hard drive?
I have tried using the terminal on Mac with the following command:
#svn checkout svn://xxx:portnumber/repo-name/trunk
This does not seem to have helped.
I have also tried to use the Organizer in Xcode to setup the repository with no luck.
Also: if the project gets downloaded, is it saved in the root directory on my hard drive?

Resources