launchscout / nku

NKU Class Spring
5 stars 14 forks source link

Assignment 1 #3

Closed awh112 closed 10 years ago

awh112 commented 10 years ago

For Assignment 1, do we wan't to just change the git repo to point from the one provided here - nku/rails - to our own?

What I did is I deleted the .git file from the /nku-rails directory and then did another 'git init' to create a connection to my own github repo, which I created first in github. Now that I have it set up I push to csc439-assignment1 (my repo) instead of the initial one (that I don't have access to push to).

Is that what we are supposed to do? Also, if this is the wrong place for this, please let me know.

Thanks, Adam

hopscotchscooter commented 10 years ago

Have you gone through the try.github.io exercises? I know it sounds lame, but that's what helped me out. I did a fresh clone of the gaslight/nku-rails repo and then followed the steps from the try it site.

awh112 commented 10 years ago

Yeah, I did the github.io tutorial, I just didn't re-try those steps using the nku-rails code. Do you still have your directory at ~/nku-rails?

hopscotchscooter commented 10 years ago

Yes.

awh112 commented 10 years ago

I wonder if I ended up functionally doing the same as what you did with a clone. Anyone know?

jaimerump commented 10 years ago

I would guess that they're checking the local repository on your Nitrous box when they go to grade everything. All you really need to do is clone the nku-rails repository onto the Nitrous box. If you're also pushing the changes onto your own github repository, that's perfectly fine, but they're not going to check that so it doesn't matter.

The only issue I can think of that you might have is if they update the nku-rails repository for another assignment. Since you reinitialized yours, it won't have the remote called origin, the one that it automatically set up when you cloned. If in the future that does end up being a problem, it's pretty easy to add a new remote, so you can fix it pretty quickly.

rockwood commented 10 years ago

Don't worry about pushing your code back up to github (git push ...). Mitch and I will be logging directly into your nitrous accounts and reviewing the code there. Any commits you make will be stored locally on your box and we'll be able to review those.

If you'd really like to push your code to your own github account, then you can add a second git remote. Here's how to do that:

  1. Create a new repository on github
  2. run git remote add my-github git@github.com:YOUR-GITHUB-USER/YOUR-NEW-REPO
  3. run git push my-github to push the code to your github account
  4. have a cookie... you earned it

TOP TIP: if you want to see all your current git remotes, run git remote -v

awh112 commented 10 years ago

So, with the way I did it, does that mean that the code would still maintain a structure even if I didn't re-do the git init? I still do local commits with git as well.

rockwood commented 10 years ago

If you deleted the .git directory, then you'll need to reinitialize the git repo with git init. From there you can do normal commits (git commit -am "Your commit message")

awh112 commented 10 years ago

Ok, great, that is exactly what I did. Thanks @jaimerump, @hopscotchscooter, and @rockwood for the help!

jaimerump commented 10 years ago

Deleting the .git will wipe out all of your remotes and your commit history, but it shouldn't affect anything else. The directory structure that was created when you cloned the repo will still be intact.