git, fzf, docker, kubernetes
This commit is contained in:
parent
f7fbedf8d7
commit
2c59996146
@ -1,8 +1,18 @@
|
|||||||
# Git
|
# Git
|
||||||
|
|
||||||
|
## Git setup
|
||||||
|
|
||||||
|
- `git config --global user.name "John Doe"` - configure global user
|
||||||
|
- `git config --global user.email johndoe@example.com` - configure global user email
|
||||||
|
|
||||||
## Add new commit
|
## Add new commit
|
||||||
|
|
||||||
|
- `git init` - initiallize repository
|
||||||
- `git add README.md` - add file/s to repository
|
- `git add README.md` - add file/s to repository
|
||||||
- `git commit -m "first commit"` - commit file
|
- `git commit -m "first commit"` - commit file
|
||||||
|
- `git branch -M main`
|
||||||
|
|
||||||
## Remote repository push
|
## Remote repository push
|
||||||
|
|
||||||
|
- `git remote add origin https://github.com/foglar/[name].git` - add remote url
|
||||||
|
- `git push origin master` - push master branch
|
||||||
|
|||||||
@ -12,5 +12,5 @@
|
|||||||
```bash
|
```bash
|
||||||
fzf --preview="bat {} --color=always"
|
fzf --preview="bat {} --color=always"
|
||||||
```
|
```
|
||||||
- To open selected file in nvim use `$()` like this: `nvim $(fzf --preview="bat {} --color=always)`
|
- To open selected file in nvim use `$()` like this: `nvim $(fzf --preview="bat {} --color=always")`
|
||||||
- You can do more complex stuff like this: `alias hist="history | awk '{for (i=2; i<=NF; i++) printf \$i\" \"; print \"\"}' | fzf | wl-copy"`
|
- You can do more complex stuff like this: `alias hist="history | awk '{for (i=2; i<=NF; i++) printf \$i\" \"; print \"\"}' | fzf | wl-copy"`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user