These are chat archives for codefellows/sea-f1-TAs/Brian

14th
Sep 2014
Linda Mummy
@lindamariemummy
Sep 14 2014 01:01
The rabbit assignment says "It should also include a file that contains the result of your outline." Is that a copy/paste error from the last assignment? Or am I missing something?
Brian Caldwell
@Caldwerl
Sep 14 2014 01:01
That is leftover copied from the Outline assignment before it
Pay no heed
Matthew Conquergood
@kristjin
Sep 14 2014 01:08
So... if I want to decrement the value of a variable beyond 0, so let's say it counts down like 2, 1, 0, -1, -2... it seems I cannot use value = --value. How should I be doing that?
Brian Caldwell
@Caldwerl
Sep 14 2014 01:10
Hmm
Matthew Conquergood
@kristjin
Sep 14 2014 01:10
Just value-1 each time?
Brian Caldwell
@Caldwerl
Sep 14 2014 01:10
You could do that
If it works its fine
when you increment and decrement
you can do post and pre
so
num++
++num
if its pre the change happens and then the number is accessed
if its post the number is used then decremented
I think? I might be mixing that up its been a while heh
Matthew Conquergood
@kristjin
Sep 14 2014 01:12
I was reading that earlier and I half get it, and can see how one worked, and one didn't, in this situation before. In fact, I had to use i=--i to get that bit to work. but I think this comes back to the limitation of using -- to decrement beyond 0... I think.
Brian Caldwell
@Caldwerl
Sep 14 2014 01:13
Like 99% of the time the post version is fine
num++
num--
and you should be able to decrement just fine into the negatives
Matthew Conquergood
@kristjin
Sep 14 2014 01:14
It does not seem to be working as such in my code.
Brian Caldwell
@Caldwerl
Sep 14 2014 01:14
Hows it look
Just that line if you please
Matthew Conquergood
@kristjin
Sep 14 2014 01:14
about to push, momentito
ah
sure
sec
oh oh
ohhh
maybe nvm, moment
smh, I know this is going to be why this is not working as expected.
It'll decrement just fine, as long as I actually do it.
Linda Mummy
@lindamariemummy
Sep 14 2014 01:26
What is supposed to go in the README file for our assignments (and just in general)? Does anyone have an example?
Brian Caldwell
@Caldwerl
Sep 14 2014 01:29
Just an overview of what it does
maybe list the variables and functions
Matthew Conquergood
@kristjin
Sep 14 2014 03:08
Hey Brian, can you help me out here, the last two times I did this, it seems I did it in a way I can't replicate. Partly because I'm trying to do everything through the command line and not use the Windows github client. I have my new .html file in a folder with my race game in it. I want to git init that folder, and get it up on github. I tried once, and failed somehow. So I thought I'd get some help with it this time and step by step it.
So it seems I've gotten through the init, the add, and the commit in the folder with no problem.
But now I'm not sure what to do next.
Brian Caldwell
@Caldwerl
Sep 14 2014 03:28
next is
git push origin [branch name here]
Matthew Conquergood
@kristjin
Sep 14 2014 03:29
I don't have to do anything on github first?
Brian Caldwell
@Caldwerl
Sep 14 2014 03:29
you havent made the repo online yet?
Matthew Conquergood
@kristjin
Sep 14 2014 03:29
no
Brian Caldwell
@Caldwerl
Sep 14 2014 03:29
Ok make a repo online
Matthew Conquergood
@kristjin
Sep 14 2014 03:29
And there's no way to do that bit from the command line correct?
Brian Caldwell
@Caldwerl
Sep 14 2014 03:29
then itll be empty and have instructions for getting it from command line to the online repo
youll have to link it to the online repo
its just a command or two thatll do it
Matthew Conquergood
@kristjin
Sep 14 2014 03:30
So I created the repo on GH
Brian Caldwell
@Caldwerl
Sep 14 2014 03:30
Itll have the specific address there when you make the repo
Matthew Conquergood
@kristjin
Sep 14 2014 03:31
So I have the address.
see, I did all this exactly this way once already... let's see what happens next here.
Brian Caldwell
@Caldwerl
Sep 14 2014 03:31
It should have the terminal commands all lined out for you
Matthew Conquergood
@kristjin
Sep 14 2014 03:32
It does, I'll just cut and paste the commands to push an existing repository from the command line
Brian Caldwell
@Caldwerl
Sep 14 2014 03:32
Yup
Matthew Conquergood
@kristjin
Sep 14 2014 03:32
well I can't paste to the command line
Brian Caldwell
@Caldwerl
Sep 14 2014 03:32
ctrl shift v
Matthew Conquergood
@kristjin
Sep 14 2014 03:33
ah, ty
yeah, so
after git status I get "nothing to commit, working directory clean"
Brian Caldwell
@Caldwerl
Sep 14 2014 03:33
Yes
you already have the commit made
Matthew Conquergood
@kristjin
Sep 14 2014 03:34
after git remote add blah blah
fatal: remote origin already exists
Brian Caldwell
@Caldwerl
Sep 14 2014 03:34
hmm
Matthew Conquergood
@kristjin
Sep 14 2014 03:34
and after the last line I get
fatal: could not read from remote repository
Brian Caldwell
@Caldwerl
Sep 14 2014 03:35
hmm what does git status say
what branch
Matthew Conquergood
@kristjin
Sep 14 2014 03:35
on branch master
Brian Caldwell
@Caldwerl
Sep 14 2014 03:35
Ok well here is a bit of a workaround
go back to your github repository
get the clone link
go to your repos directory
then do
git clone [whatever the link is]
place the files into that new directory
then push it to the repo
Matthew Conquergood
@kristjin
Sep 14 2014 03:37
how do I get the clone link?
Brian Caldwell
@Caldwerl
Sep 14 2014 03:37
It should be on the same page that had the terminal commands to link to remote
Matthew Conquergood
@kristjin
Sep 14 2014 03:37
just an https link or something more?
Brian Caldwell
@Caldwerl
Sep 14 2014 03:38
thats it
Matthew Conquergood
@kristjin
Sep 14 2014 03:39
"warning: you appear to have cloned an empty repository"
Brian Caldwell
@Caldwerl
Sep 14 2014 03:39
thats fine
lets cure its emptiness
Matthew Conquergood
@kristjin
Sep 14 2014 03:40
the files are already in the directory and committed
file*
Brian Caldwell
@Caldwerl
Sep 14 2014 03:40
were copying it to the cloned directory
Matthew Conquergood
@kristjin
Sep 14 2014 03:40
on the remote server, yes?
Brian Caldwell
@Caldwerl
Sep 14 2014 03:40
Nope, the empty repository you just made
with the git clone command
Matthew Conquergood
@kristjin
Sep 14 2014 03:41
the empty repository I just made... where?
Brian Caldwell
@Caldwerl
Sep 14 2014 03:41
On your computer
when you did that command
Matthew Conquergood
@kristjin
Sep 14 2014 03:41
oh... so it's a subfolder now?
Brian Caldwell
@Caldwerl
Sep 14 2014 03:41
it made a new folder with the name of the repository you made online
Matthew Conquergood
@kristjin
Sep 14 2014 03:41
argh, I didn't want that... is that important?
Brian Caldwell
@Caldwerl
Sep 14 2014 03:41
you did
Matthew Conquergood
@kristjin
Sep 14 2014 03:41
It should be a subfolder of my dev folder for the code?
Brian Caldwell
@Caldwerl
Sep 14 2014 03:42
well you can just clone it somewhere else then
or move the folder
Matthew Conquergood
@kristjin
Sep 14 2014 03:42
So... I have the same code, in two folders on my pc?
You have so lost me.
Brian Caldwell
@Caldwerl
Sep 14 2014 03:43
You have two repos on your computer
only one is actually linked to the online repo
we need the code to be in that repo
Matthew Conquergood
@kristjin
Sep 14 2014 03:43
Why do I have two repos on my computer?
What's the value in that?
Brian Caldwell
@Caldwerl
Sep 14 2014 03:43
Because we just cloned one because the other wasnt connecting for whatever reason
Matthew Conquergood
@kristjin
Sep 14 2014 03:44
I see.
Now it all makes sense.
Brian Caldwell
@Caldwerl
Sep 14 2014 03:44
We were trying to link the first one you init on your pc
But that wasnt working
Matthew Conquergood
@kristjin
Sep 14 2014 03:44
I can't clone to a folder that exists and isn't empty, can I?
Brian Caldwell
@Caldwerl
Sep 14 2014 03:44
You can clone anywhere
Matthew Conquergood
@kristjin
Sep 14 2014 03:45
ok sec
Brian Caldwell
@Caldwerl
Sep 14 2014 03:45
where ever you do it itll make a folder with the name of the repo there
and thats where we need your code copied into
Matthew Conquergood
@kristjin
Sep 14 2014 03:46
can I copy the one that it made where I want it?
Brian Caldwell
@Caldwerl
Sep 14 2014 03:46
Sure
Matthew Conquergood
@kristjin
Sep 14 2014 03:46
ok
done
now I shall copy my html into that folder yes/
Brian Caldwell
@Caldwerl
Sep 14 2014 03:46
Yup
then do git status in that folder
Matthew Conquergood
@kristjin
Sep 14 2014 03:47
now I have the untracked file
Brian Caldwell
@Caldwerl
Sep 14 2014 03:48
Yeah, so you need to add commit etc again
Matthew Conquergood
@kristjin
Sep 14 2014 03:48
so I should git add . and git commit -m "initial commit" ya
kk
mmk
Brian Caldwell
@Caldwerl
Sep 14 2014 03:48
then git push origin master
Matthew Conquergood
@kristjin
Sep 14 2014 03:48
out of curiosity I did a git status
Your branch is based on 'origin/master' but the upstream is gone
Brian Caldwell
@Caldwerl
Sep 14 2014 03:49
huh
did git push work?
Matthew Conquergood
@kristjin
Sep 14 2014 03:49
haven't tried yet
so what's the code to push it
since... this isn't the origin, I suppose
Brian Caldwell
@Caldwerl
Sep 14 2014 03:50
git push origin master
Matthew Conquergood
@kristjin
Sep 14 2014 03:50
oh
ok
new branch master -> master
Brian Caldwell
@Caldwerl
Sep 14 2014 03:51
Yup
check online
Matthew Conquergood
@kristjin
Sep 14 2014 03:52
ok. one down
Brian Caldwell
@Caldwerl
Sep 14 2014 03:53
Yup I can read it from here now
Just to note, thats how I typically do it
Make the repo
clone it to my Repos directory
then start writing the code in there
Its all linked and set that way
Matthew Conquergood
@kristjin
Sep 14 2014 03:54
Makes the most sense tbh
yeah
assignment turned in
It's a fun game imo
Matthew Conquergood
@kristjin
Sep 14 2014 15:24
Bummer, I can't take the class 3 attendance quiz because it's expired.
Brian Caldwell
@Caldwerl
Sep 14 2014 16:36
I will set it
Matthew Conquergood
@kristjin
Sep 14 2014 18:51
tx