On Apr 22, 2016 19:56, "'JCL' via Git for human beings" <
git-users@googlegroups.com> wrote:
>
> Hello-
>
> I am struggling to get this right..
>
> I do alot of work on my laptop using xCode.
> My desktop is a win10 machine using VS.
>
> I am  using git on my mac but only using it on one machine.
>
> I would like to use both machines to edit and commit to my assignments,
etc.
>
> My question is how may I accomplish this...I have exhausted google
searches and
> get more confused than anything, and I am sure this is simple.
>
> When I create an xCode project, I will create multiple targets
> as there might be 2 or 3 problems per assignment.
> Xcode then creates a project file, etc.

Decide if you want to put that in the repo. If you think you may publish
this project to somewhere like GitHub (so potentially, others will work on
this project later), you shouldn't. In this case, put the project file to
.gitignore. Also, you may want to remove it from the repo with "git rm
--cached projectfile" and commit that change. --cached means it won't get
deleted from the disk, only from the repository ("database" of Git).

> When I go to my windows PC, if I go into VS and clone the repo,
> there is not a compatible project file ( obviously, as its not xCode).

If you removed the xcode stuff, this problem is already gone, except mayba
VS does the same (create files for your solutions), so you may want to
ignore them, too, just like before.

> What is the simplest way to accomplish this?  Keep in
> mind I am a beginner with git.
>
> Also, if I use a gitignore file and put it in the repo after the
> repo has already had commits, will it drop and delete the
> now ignored files moving forward?

I think I already answered that; it won't get deleted. "git rm" would
delete them from the disk *and* the repo; if you use cached, it gets
deleted from the repo only (also see [1] for some lessons learned about
this).

[1] http://gergely.polonkai.eu/blog/2013/1/14/git-rm-cached-madness

> Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to