Skip to content
This repository has been archived by the owner on Aug 22, 2020. It is now read-only.

Syncing and Committing with Command Line #101

Closed
RJP43 opened this issue Jan 16, 2016 · 5 comments
Closed

Syncing and Committing with Command Line #101

RJP43 opened this issue Jan 16, 2016 · 5 comments

Comments

@RJP43
Copy link
Collaborator

RJP43 commented Jan 16, 2016

@mjb232 @mmm202 @jlm323 @laurenmcguigan

Hi new students,

Here are the comments on using command line that were on the board yesterday:

First open your GitHub GUI (desktop client).
You should see the DHClass-Hub repo on the left side. Right click on the repo.
screenshot_1
Select "Open in Git Shell".
In order to sync any changes made on the remote repo (as in the repo that we all have access to change) and to pull in any of changes to you local version of the repo follow these commands:
type git status -uno then hit enter -- if changes were made that you are behind on you should get a similar message as the one below:
clonerepo_gitstatus-uno_behind
Otherwise iT will say you are up to date with the origin/master (which is the remote repo located on the GitHub server).
From here you want to do git pull then hit enter. This command "pulls" in those changes. Git Shell should now look like this:
clonerepo_aftergitpull_when behind
Now check to see if you are up to date with the git status command (again hitting enter after typing the command).
clonerepo_aftergitpull_thengitstatus_up2date
Now let's say you added files on your local computer and you want to commit them to the remote repo. First you save the files in local directory configured with GitHub. Then once in Git Shell you run the following commands:
It is always best practice to first do git status or git status -uno to see where your local repo stands against the remote origin. If you have added files to the directory Git will now inform you that you have "untracked files" that needed added:
clonerepo_untrackedfile_gitstatus
To "push" those files into the remote origin do the following:
git add .
git commit
At this point a text box will pop up where you should type your commit message (describing the changes you are making), then hit save and close.
The final command is git push and this moves the locally changed files into the remote origin.
clonerepo_gitpushgitstatus_up2date

@spadafour @nlottig94 @brookestewart I encourage you all to mess around with these basic commands and to use them instead of the "gooey" GUI client. You will find using command line allow you to really see under the hood of how GitHub stores your files and it is typically quicker. A tutorial detailing more commands is on the way so stay tuned :)

@ebeshero
Copy link
Owner

@RJP43 Thanks for developing this, Becca! The screen captures are really helpful. 👍

@RJP43
Copy link
Collaborator Author

RJP43 commented Jan 27, 2016

For more on this please visit our Git Shell tutorial page

@alexkrongel
Copy link
Collaborator

Hello! Sorry if I'm responding to the wrong topic, I wasn't quite sure where to give feedback on the main git tutorial.

The one change I thought might be good in the beginning is a comparison between this and other version control systems. For example, students might not know Dropbox also has version control, albeit only allowing you to fully revert (edge: Git, etc.)

I liked how thorough the account and repo sections were. However, I think it might be nice to move the account setup section to a separate page. I think most people will not have trouble with this section, and it adds a lot of length to the tutorial which makes it look more intimidating than it actually is.

One other thing that we've all been discussing is public versus private repos. I think something could be said in the best practices section about always leaving your code public unless there is a specific reason like copyright for doing otherwise (though I understand if that might be going a bit more philosophical than the scope of this tutorial.)

Awesome work @RJP43 !

@jrzodkiewicz
Copy link

This looks great. I have two suggestions. First, the reader may be disoriented by the way you start the tutorial by referring to the GUI. The instructions seem to abruptly change directions at that step: "Here's how to use the command line. Step one, open the GUI." Adding a sentence or two as a transition would make it read more smoothly. And, since this is a command line tutorial, it might also be helpful to add some alternate initial steps to explain how to do these things without using the GUI at all.

Second, explaining the commands in greater detail would teach the students more and probably help the students remember them. For example, what does the "-uno" flag do? Right now I just see it as a thing to memorize, and since it has no semantic links to anything else in my mind, memorizing and recalling it might be difficult. Of course, this isn't meant as a definitive Github textbook, so we don't need to know all of the details, but if students engage with the commands' internal logic, they'll understand the system better, and better retain that understanding.

@RJP43
Copy link
Collaborator Author

RJP43 commented Feb 2, 2016

Thank you both for these helpful suggestions and comments... this is technically our Class Hub and we have a separate repo. for web development where this conversation was meant to be had (found here). I think it is fine that these comments sit here but I am providing the link for any future comments/suggestions. Thanks again, to both of you, for taking such a close look at this tutorial. 👍

@RJP43 RJP43 closed this as completed Aug 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants