GitHub support for multiple directories - github

ALL,
I am managing multiple projects. All of them located on the GitHub and I'm using GitHub for Windows GUI and GitHub Shell.
Recently one of the projects got updated with the really big file name and so in order to keep the GitHub happy I had to move it from the standard place: c:\documents and settings\\My Documents\GitHub to just c:.
This created a disaster as I currently have two places to manage.
Is it possible to keep GitHub GUI happy and stop making new repository on the C:\? In other words, can I configure GitHub to use 2 source directories?
Thank you.

You can drag the root folder of a git repo (the one under c:\ in your case) from Windows Explorer onto the start screen in GitHub for Windows. Then it can see your repo and can manage it in your non-default location.

Not for a single repository.
You could move the entire repo to the C: drive.
Or you could manage 2 repositories, one in My Documents and the other on the C: drive.

Related

why is there a GitHub folder on my computers boot drive?

I use GitHub. I thought the files were stored on the website. so why do I have a GitHub folder on my desktop (it takes up a lot of bootdrive space)? The GitHub folder has subfolders with the names of my repositories
C:\Users\cches\Documents\GitHub
That is choice made by the tool you are using when working with GitHub: you are using GitHub Desktop.
And GitHub Desktop chooses to store its local cloned repos in %USERPROFILE%/Documents/GitHub (as shown in issue 1663)
You should be able to delete those stored repos, clone only the ones you need, and File | Add existing repository in Desktop, as in issue 2851.

GitHub GUI move folder from one repo to another

I have multiple repositories under my account, and I placed a folder into the incorrect repo.
Is there a way use the GitHub web interface to move that folder from one repo to another?
From GitHub GUI alone, I don't think so.
You can delete files from the web GUI, but you still need to push your folder content from a local cloned repo (the right one this time)
Note: even if GitHub GUI referred to GitHub Desktop, you would still need to push.

Eclipse - sharing project directory with multiple users

We are trying to set up Eclipse so that two users can share the same project directory on our server. Is this possible? Every time we try, it creates a new folder and project.
Thanks!
Chris
No, this isn't possible. Eclipse only supports a single user accessing a workspace (not just a project) at a time.
Use a source control system such as Git or SVN to share code. Eclipse supports many such systems and has extensive sharing support in the 'Team' menus.
The best way to do this would be to use source control.
Sharing the actual workspace or the files with different eclipse instance is a recipe for trouble.
An easy way to do this would be to install git on your machine and also on his machine. Eclipse actually already has git in it ready to go so you probably dont need to install anything.
The one with the files locally will create a repo locally on his computer and commit the files to it.
Next you want to init a new empty repository on a shared folder and push your local chances to this as you would to github for example.
Your partner can then git clone from this repository to his machine and work locally.
Each of you will develop on your own copy and commit your changes locally. You will share your changes by pushing your commits in that central repo and pulling from it to get changes from your partner.
You could also just open an account on GitHub, GitLab or BitBucket (there are many others too) and use that instead of a shared folder. big advantage with these services is that they will be available from anywhere.

Windows Github issue pushing a new folder

I'm a VSS (Visual source safe) & Dropbox guy but new to GitHub. I'm using Windows Github tool to manage repositories on our remote server as I concluded in my previous SO post. I was glad to have sought this single point easy to use tool without any need for a deeper knowledge of git.
Things have been working fine until one day I had to add a new folder
to my repository. The Windows Github tool wouldn't recognize the
folder as a new content to be pushed! After some struggle I derived
that it "does" maintain sync with my "initial folders" but simply
creating a new folder in the repository directory wouldn't sync it
like Dropbox!
I searched to know how I can do it or if I had to use GitShell. My bad any I tried it, failed. Finally, I decided to purge everything and re-create the repository folder structure with this new folder like I did with my initial setup. But I don't know how or why it kept saying that the /.git/index file was being used by another process. I tried to empty this folder but it wouldn't. Finally, a logoff was able to free that file for me and I re-created everything. Pheew!
I might be doing it wrong as a newbie or even misusing Git due to my Dropbox habits. Pls correct me! What would be the best way?
My usage is more like VSS & dropbox(with version control) in a small remotely connected team. I started with this simple Windows Github tutorial. What about the following two -
TortoiseGit
msysgit
Do they provide better management? Pls suggest if Windows GitHub is the best (if so how to add folders later?)
Just in case, do note that adding a folder won't trigger anything for Git: you won't be able to push it if that folder is empty, because Git will consider it as "no content", and will ignore that new folder.
See also "How do I add an empty directory to a git repository?".
If you add a folder and some files in it, then the GitHub for Windows interface will detect that new content, and ask you to add and commit, which means you will be able to push.

Is it safe for multiple users to use a Git repo on a shared network drive?

We're using Eclipse (with the eGit plugin) and I want to host a repo on a shared network drive that several users have write access to.
Can users all point at the same original repo (on the shared drive) or would it be better for each user to clone the repo to their local drive, work off this local version, and push changes to the networked original as required?
Eclipse seems to allow you to "import" (to your Eclipse workspace) a project from a Git repo, but that imported project doesn't seem to be monitored by Git until you choose to "Share project". At this step the working directory becomes that of the repo's working dir for that project. Presumably all users sharing this project would have the same working dir i.e. that of the repo on the shared drive.
I am not clear on the implications of this, but it doesn't seem like a good idea, on first inspection! How will it handle basic problems like 2 users trying to open the same file for editing simultaneously, for instance?
Thanks.
It's better that each person has their own repo.
Clone you current repository as a bare repo and place it on the network drive.
e.g.
git clone --bare /path/to/current/cool_project cool_project.git
Move the cool_project.git to your network drive, and get everyone to clone from that. Bare repos don't have a working directory, hence the name, so they are safe to push to.
See the chapter 4 of the Git Pro book - Git on a Server, and specifically chapter 4.2 for more details.
From the sound of it you are talking about each user pointing to the git repository over the network and not having individual git repositories on each developer's computers and then pushing to a 'central' repository. If I am correct in reading your question that is not a great way to take advantage of what git has to offer. Git is a distributed version control system so everyone should have their own repository and push the changes to a central repository that you do your CI builds off of.