added formatting to org/git.org
This commit is contained in:
parent
794fbbf944
commit
a3b137f44f
34
org/git.org
34
org/git.org
@ -1,32 +1,34 @@
|
|||||||
* Git
|
* Git
|
||||||
|
|
||||||
1. apt install git
|
** To create a repo
|
||||||
2. (add git config stuff here)
|
on gogs
|
||||||
1. it would be weird if git lost track of those updates... but I probably did something stupid.
|
1. git config --global user.name "<gogsusername>@whatever"
|
||||||
3. create repo in gogs
|
2. create repo in gogs
|
||||||
|
|
||||||
|
on computer
|
||||||
|
3. apt install git
|
||||||
4. git clone repo
|
4. git clone repo
|
||||||
5. touch README.md
|
5. touch README.md
|
||||||
6. git add -A
|
6. git add -A
|
||||||
7. git commit -m "first commit"
|
7. git commit -m "first commit"
|
||||||
8. git push origin master
|
8. git push origin master
|
||||||
|
|
||||||
|
** To collaborate on an existing repo
|
||||||
To collaborate on an existing repo
|
|
||||||
1. Be added as a collaborator
|
1. Be added as a collaborator
|
||||||
2. git clone <repo> (I'll show you where to get the addy)
|
2. git clone <repo address (from gogs)>
|
||||||
3. git checkout -b <branchname>
|
3. ~git checkout -b <branchname>~
|
||||||
- ~-b~ yocreates a new branch if one doesn't exist
|
- ~-b~ yocreates a new branch if one doesn't exist
|
||||||
- you can name branch anything, start w/ your gogs name
|
- you can name branch anything, start w/ your gogs name
|
||||||
4. make changes
|
4. make changes
|
||||||
|
|
||||||
To push up your changes
|
** To push up your changes
|
||||||
1. git checkout master
|
1. ~git checkout master~
|
||||||
2. git pull origin master
|
2. ~git pull origin master~
|
||||||
3. git checkout <branchname>
|
3. ~git checkout <branchname>~
|
||||||
4. git merge master
|
4. ~git merge master~
|
||||||
5. git add -A
|
5. ~git add -A~
|
||||||
6. git commit -m "concise explanation of what I did"
|
6. ~git commit -m "concise explanation of what I did"~
|
||||||
7. git push origin <yourname>
|
7. ~git push origin <yourname>~
|
||||||
8. submit a pull request
|
8. submit a pull request
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user