Cleanup Github account - github

I created a Github account earlier this year when I first started programming and didn't really know what I was doing and now I'm wonder if there is a way I can tidy up my account. I would like to create a repository and move all of my class projects into it, similar to throwing a bunch of files on your desktop and then cleaning it up by creating folders to drop the files into.

Sure.
I recommend you start by downloading GitHub Desktop, which is a user interface that will allow you to manage your Git repositories.
Works on Windows and OSX.

Related

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.

Using GitHub to listen to changes made to files on remote server

I know there are a lot of posts about running GitHub on a remote server, but I can't find any that I understand or can follow. Command line stuff and all this talk about SSH completely befuddle me, so I am hoping for a step-by-step answer which is literally written for a dummy and hopefully provides an easy solution (I am having my fingers and toes crossed).
My scenario:
I have built a site using Statamic as a CMS, which uses text files to manage the site's content. I also have a GitHub repository which contains most of the site's files here:
https://github.com/katrinkerber/katrinkerber
I am using the GitHub app on OSX to push any changes I make to, for example, my local CSS or HTML files to the remote Github repository. That is as far as my basic understanding of Git takes me really.
Whenever existing content is edited or a new page/entry is published through the CMS's Control Panel, a file is updated or created inside the *_content* folder on the server where the site is hosted.
What I want is for Github to listen to and keep track of any changes made on the server, particularly that *_content* folder.
One of my attempts was to just upload the .git folder in my local files to my server and change the Primary remote repository path, but that didn't work.
What do I need to do?
Really the only way to run Git (the version control system, not GitHub the web application/network) is via SSH.
Here's a good article: http://git-scm.com/book/en/Getting-Started-Installing-Git#Installing-on-Linux
And if you get that up and running, here's a good way to set up deployments: http://blog.ekynoxe.com/2011/10/22/automated-deployment-on-remote-server-with-git/

How to setup SVN repository in XCode?

I have got to the point with developing iPhone apps that I need a way of managing versions. I have looked into the ways to do this through Xcode and I see that I can either go down the path of using GIT or SVN.
In the past I have used SVN which is the reason I'm more inclined to go down this path (I'm open to using GIT if people feel it is better than SVN). My question is related to the setup of a repository in Xcode.
I have done a fair amount of research and I have found several useful tutorials, however a lot of the seem to be outdated.
My question is 2-fold:
Please can someone advise on the steps to setup a repository through Xcode?
I notice Xcode requires me to set the location of the repository. I'm not sure what to do here, since I don't have my own server. Is there a way I can get around this? Can I setup a local repository somehow (if so how? if not what are my other options?)?
Thanks in advance for any help or advice people can offer.
I think you should go with using GIT. You can create free repository on bitbucket.org
It allows you to create free account which can be used using 5 members of your team. If you want more you need to pay.
Once you are done with creating repo. just check it out on your pc. There are steps given on that site how to do that. Then in the folder which you checked out, create your XCode project. Once your project is ready, add it to the repository. How to do that is also given on bitbucket. Then once you have committed your Xcode project to repository, add that repository to XCode. How to do that is very nicely explained in XCode guide. Just read that.
If you have a home server (or company server), I would use uberSVN. The guided installation is extremely simple. I actually use this to keep all of my Xcode projects under version control.
Steps:
Install an SVN client. (Bottom-right of the page. You can choose 1.6 or 1.7, and your OS via the tabs on the top of the page).
Install uberSVN.
Setting up one's own Subversion or Git server is something developers shouldn't have to fight with, it can be a pain (in terms of sys administration).
If it were me, I'd consider using GitHub if you want to share code publicly (free!) or if you want to share code privately among several of your own computers.
If you're sharing among your own computers, a "micro" account on GitHub runs $7 per month. This is the option I do for my own private & personal projects. So nice to have support built into Xcode.
There are also other third party providers that do both Subversion and Git, such as WebFaction, but this would also cost dollars as well. All of these services have to recoup the costs of doing your system administration. But I think having somebody else do it for you is well worth not having to deal with the hassle.
SVN requires you to use a server to host your repository on. If you're working on an open source project there are webservices that will allow you to host your repository for free (Google Code for instance). Although it's possible to have the server on the local machine, it's better to use GIT in that case. When you create a new project XCode will propose to setup a GIT repository for you, or see this on how to create a new repository for your existing project.
It's actually very easy to setup a local SVN repository on your Mac and reap the benefits of version control without remote/networked repository.
See e.g. explanation here https://stackoverflow.com/a/10039004/226086
Then the path you give Xcode is wherever you set up the repository, say file:///Users/Shared/subversion/ - under Preferences/Accounts/Add Repository, when it asks "Enter repository address".

Drupal 6: using bitbucket.org for my Drupal projects as a real version control system dummy

Here is a real version control system dummy! proper new starter!
The way I have worked so far:
I have a Drupal-6 web project www.blabla.com and making development under www.blabla.com/beta . I'm directly working on blabla.com/beta on server. nothing at my local, nothing at anywhere else. Only taking backup to local, time to time. I know horrible and not safe way :/
The new way I want to work from now on:
I decided to use Mercurial. I have one more developer to work on same project with me. I have a blabla.com Drupal-6 project on bluehost and making development blabla.com/beta. I found out http://bitbucket.org/ for mercurial hosting. I have created an account.
So now how do I set up things? I'm totally confused after reading tens of article :/
bitbucket is only for hosting revised files? so if I or my developer friend edit index.php, bitbucket will host only index.php?
from now on do I have to work at localhost and upload the changes to blueshost? no more editing directly at blabla.com/beta? or can I still work on bluehost maybe under blabla.com/beta2?
When I need to edit any file, do I first download update from bitbucket, I make my change at localhost, update bitbucket for edited files, and uploading to bluehost?
Sorry for silly questions, I really need a guidance...
Appreciate helps so much! thanks a lot!
bitbucket is only for hosting revised files?
The main service of bitbucket is to host files under revision control, but there is also a way to store arbitrary files there.
so if I or my developer friend edit index.php, bitbucket will host only index.php?
I a typical project every file which belongs to the product is cheked into revision control, not only index.php. see this example
from now on do I have to work at localhost and upload the changes to blueshost? no more editing directly at blabla.com/beta? or can I still work on bluehost maybe under blabla.com/beta2?
Mercurial does not dictate a fix workflow. But I recommend that you have mercurial installed where you edit the files. For example then you can see direct which changes you did since the last commit, without to need to copy the files from your server to your local repository.
I absolutely recommend a workflow where somewhere in the repository is a script which generates the archive file which is transmitted to the server, containing the revision of the repository when the archive got created. This revision information should also be somewhere stored on the server (not necessarily in a public accessible area), since this information can get very handy when something went wrong.
When I need to edit any file, do I first download update from bitbucket, I make my change at localhost, update bitbucket for edited files, and uploading to bluehost?
There are several different approaches to get the data to the server:
export the local repo into an archive and transmit this onto the server (hg archive production.tar.bz2), this is the most secure variant, since it does not depend on any extra software on the server. Also depending on how big the archive is this approach can waste lots of bandwidth.
work on the server and copy changed files back, but I don't recommend this since is is very easy to miss something important
install mercurial on the server, work in a working copy there and hg export locally there into the production area
install mercurial on the server and hg fetch from bitbucket(or any other server-accessible repository)
install mercurial on the server and hg push from your local working copy to the server (and hg update on the server afterwards)
The last two points can expose the repository to the public. This exposition can be both good and bad, depending on what your repository contains, and if you want to share the content. When you want to share the content, or you can limit the access to www.blabla.com/beta/.hg, you can clone directly from your web server.
Also note that you should not check in any files with passwords or critical secrets, even when you access-limit the repository. It is much more save to check in template files (with a different name than in production), and copy-and-edit these files on the server.