Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub guide #9

Merged
merged 16 commits into from
Sep 11, 2017
Merged

Add GitHub guide #9

merged 16 commits into from
Sep 11, 2017

Conversation

vladimir-v-diaz
Copy link
Contributor

@lukpueh and I thought it made more sense to have the Git+GitHub guide available on the lab-guidelines repo. This pull request addresses issue secure-systems-lab/code-style-guidelines/issues/13

Copy link
Contributor

@aaaaalbert aaaaalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read through the document, clicked all of the links, fixed a few trivial issues, and left a couple of comments. Feel free to address as you see fit.

You can check your user information by typing the following command:

```
$ git config --list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you've used Git already on this machine, this command yields a long scary list of config items.

For checking just the user name and email, one could use git config --get-regexp user

configuration if you use the global flag (as in the provided example).

```
$ git config --global user.name "John Smith"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An irrelevant BTW: Configuring user.name seems to be optional, only the email address appears to be a mandatory config item. Also, the user name need not be your actual name.

Copy link
Contributor Author

@vladimir-v-diaz vladimir-v-diaz Sep 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noted in the guide that the user.name value is arbitrary, but it is customary to use your full name. I also decided to retain the user.name configuration since the official Git docs advise users to set it, and the error message one receives when a Git identity is unset asks for a user.name.

https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup

Fetching and merging the latest changes of `upstream` (remembering that the
`upstream` alias points to the original repository) can be done with Git's
`pull` command. The `pull` command fetches changes made to the remote
repository and merges them into your local repository. Branches are multiple
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to break the paragraph and add a new subsection, "Branching".

![GitHub Branches](/images/branches_sm.png)

Additional information on [syncing a
fork](https://help.github.com/articles/syncing-a-fork/) is recommended.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"recommended" as in "a recommended read"? Should this be, [The GitHub help](...) has more information on keeping your forks in sync with upstream?

@aaaaalbert
Copy link
Contributor

How can we help our newcomers to adopt Git quickly (to use it productively for their own work) and in a way that interfaces nicely with our workflows?

Should we send newcomers to @octocat's Spoon-Knife repo to actually try out the theoretic skills acquired through this guide?

Or shall we have a playground repo of our own where people can experiment? "First task on first day on the team: Add your favorite sports/treat/metro line to secure-systems-lab/playground" sorts of thing?

@baloian
Copy link

baloian commented Sep 11, 2017

How about something like this
https://codingsec.net/2016/06/frequently-used-git-commands/

@vladimir-v-diaz
Copy link
Contributor Author

@baloyan
We used to have a bunch of those Git Cheat Sheets in the old lab. I've added a link to it in the Guide, since I found it helpful in the past.
https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf

@vladimir-v-diaz
Copy link
Contributor Author

@aaaaalbert
Thanks for the excellent review and edits.

@aaaaalbert
Copy link
Contributor

Thanks for addressing my concerns, @vladimir-v-diaz!

@aaaaalbert aaaaalbert deleted the add_github_introduction branch September 18, 2017 20:14
lukpueh added a commit to lukpueh/code-style-guidelines that referenced this pull request Nov 18, 2020
Following secure-systems-lab#14, which removed 'git-github-introduction.md', this
commit removes images referenced by that document. Both document
and images is also available in the lab-guidelines repo (see
secure-systems-lab/lab-guidelines#9).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants