Update
This commit is contained in:
parent
ea07d624a8
commit
9284009450
19 changed files with 1932 additions and 1906 deletions
23
git.md
23
git.md
|
@ -29,15 +29,17 @@ Here are some alternatives to git:
|
|||
|
||||
TODO
|
||||
|
||||
- `git add files_you_changed; git commit -m "Update"; git push`
|
||||
- `git pull`
|
||||
- `git stash`
|
||||
- `git rm file_to_remove`
|
||||
- `git init`
|
||||
- `git log`
|
||||
- `git diff`
|
||||
- `git apply diff_file`
|
||||
- *weird error*: just look it up on stack overflow
|
||||
- `git clone repo_address`: Clones online repository to local directory.
|
||||
- `git add files_you_changed; git commit -m "Update"; git push`: This is how you make a commit, do this after every meaningful change (added feature, fixed bug, ...). Bonus points for writing meaningful messages.
|
||||
- `git pull`: Updates your local repository with the newest commits from the online repo that someone (for example you on another computer) made. This will fail if you have uncommitted changes because you would lose them: either commit your changes or destroy them with `git stash`.
|
||||
- `git stash`: Scratches all the uncommitted changes you currently have. Use if you were trying something that didn't work out for example.
|
||||
- `git rm file_to_remove`: Removes a file, works the same as normal `rm` but also informs git about this removal so that it will be part of the next commit.
|
||||
- `git init`: Initializes a new repository in current directory. After this just `git add` your initial files and commit them.
|
||||
- `git log`: Shows latest commits.
|
||||
- `git diff`: Shows [diff](diff.md) of your current uncommitted changes. Good for making [patches](patch.md) or checking what exactly you are committing.
|
||||
- `git apply diff_file`: Applies a [patch](patch.md) previously made with `git diff`.
|
||||
- *weird error*: Just look it up on stack overflow.
|
||||
- *fix fucked up repository*: Just `rm -rf` the whole directory and `git clone again`.
|
||||
|
||||
### Set Up Your Own Git Server
|
||||
|
||||
|
@ -73,4 +75,5 @@ IMPORTANT NOTE: for the HTTP clone to work you need to do `git update-server-inf
|
|||
|
||||
- [GitHub](github.md)
|
||||
- [shithub](shithub.md)
|
||||
- [git gud](git_gud.md)
|
||||
- [git gud](git_gud.md)
|
||||
- [version numbering](version_numbering.md)
|
Loading…
Add table
Add a link
Reference in a new issue