-
Notifications
You must be signed in to change notification settings - Fork 256
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
[WIP] Tool - Git #393
base: master
Are you sure you want to change the base?
[WIP] Tool - Git #393
Conversation
- About.md added with basic installation with tools and plugins information - Git-configuration.md added with how to setup your git config in basics and show more details source as well
cc : @t0xic0der @mscherer |
Hello, thanks for the PR! I've also created a quick guide to work with git, but didn't get around to import it yet. Could you if there's anything you could use (not covered by you)? https://github.com/developer-portal/website/blob/master/DEVELOPMENT.md#Git-repositories |
Hey @thunderbirdtr, I suggest adding the best of both your and @pvalena's guides to make one unified quick guide for folks. What do you think? |
We can definitely extend from @pvalena end as well to have better guide, sure I'll update more and add other sections such as pulling and rebases what I can see in first glance and It would be valuable as well. Thank you so much ! :) |
LGTM, apart from the order bug. Thanks! |
@pvalena hello friendly reminder/ping; can we merge this ? Is there anything do we need to add into it ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made improvement suggestions for the content.
Please also open a pull request adding the git logo in png to developer-portal/website and provide source in the PRs description for the license of the logo.
The addition of the fortran logo can be used as a reference: developer-portal/website#120
|
||
## Creating Branches | ||
|
||
Let’s go through a simple example of branching workflow that you might use in the real world.Once create new branch it will give us current branch we have in our repository.Give it a name appropriately. For instance, a branch consisting of work you doing it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am quite lost in reading this; I tried to approximate what you probably meant at the time of writing, but please recheck my suggestion if it is truly correct. Also, fixed usage of a space after a dot in a sentence.
Let’s go through a simple example of branching workflow that you might use in the real world.Once create new branch it will give us current branch we have in our repository.Give it a name appropriately. For instance, a branch consisting of work you doing it. | |
Let’s go through a simple example of a branching workflow that you might use in the real world. First, create a new branch in our repository. Name it appropriately, for instance, a branch describing the work you are doing on it. |
|
||
|
||
## Cloning Git Repository | ||
Open up a terminal in a directory where the repository would be cloned. Execute the following command (with additional parameters if needed to accommodate custom-named SSH keypair files) to clone the fork repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd reword this to sounds more certain.
Open up a terminal in a directory where the repository would be cloned. Execute the following command (with additional parameters if needed to accommodate custom-named SSH keypair files) to clone the fork repository. | |
Open up a terminal in a directory where you want to clone the repository into. Execute the following command (with additional parameters if needed to accommodate custom-named SSH keypair files) to clone the repository. |
Does not seem like forked repo that we are cloning here.
Also, the first time I am hearing about custom-named SSH keypair files in relation to git clone
. (git manages to pull out the correct ones for me anyway)
Would you mind writing a few sentences about the additional parameters?
|
||
## Git Status | ||
|
||
After on the working on the code, execute the following command to know about the changes made with additions, removals and modifications made in the tracked and untracked files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rewrite for conciseness.
After on the working on the code, execute the following command to know about the changes made with additions, removals and modifications made in the tracked and untracked files. | |
After making changes to the files, execute the following command to list the modifications in the tracked files and list untracked files if there are any. |
|
||
## Git Add | ||
|
||
Stage the changes of similar kind by executing the following command to prepare them to be committed. Please note that multiple changed files can be staged for single commit, but it is strongly recommended to keep dissimilar changes as separate commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stage the changes of similar kind by executing the following command to prepare them to be committed. Please note that multiple changed files can be staged for single commit, but it is strongly recommended to keep dissimilar changes as separate commits. | |
Stage similar changes by executing the following command to prepare them to be committed. Please note that multiple changed files can be staged for a single commit, but it is strongly recommended to keep dissimilar changes as separate commits. |
And then checkout the branch: | ||
|
||
``` | ||
$ git checkout -b new-branch-name -t $remote/$branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain what does the switch -t
mean/do.
git config --global user.name "<your-full-name>" | ||
``` | ||
|
||
Setting up your `core.editor` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please list some examples of what is git using the editor for. Like git commit
and other commands that need manual intervention.
git config --global core.editor vim | ||
``` | ||
|
||
It can be change various editors such as `emacs`,`vi`,`nano`,`neovim`,`Kate` and more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be change various editors such as `emacs`,`vi`,`nano`,`neovim`,`Kate` and more | |
Various editors such as `emacs`, `vi`, `nano`, `neovim`, `Kate` and more can be used. |
|
||
There are cases you want to view some changes wich are already in your fork (e.g. modified using Github WebUI). We're using variables holding your remote and branch names: | ||
|
||
If you already have branch in your computer your can just pull via "git pull" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you already have branch in your computer your can just pull via "git pull" | |
If you already have a branch in your computer you can just pull via "git pull" |
Hmm, branch in your computer
does not sound right. Maybe in your local repository
is better?
Hello, I would like to add "basics of git" but I need reviews and opinions about it. I also don't know how to add "picture" for tool. That would be also cool. Once it is finish I'll remove "WIP" If accepted.
Thank you.