Couldn't get branchs working like expected working to undo
This commit is contained in:
parent
2fddb1c09e
commit
32c67d6fee
52
README.md
Normal file
52
README.md
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# dotfiles
|
||||||
|
|
||||||
|
My dotfiles for both Arch Linux and Windows
|
||||||
|
|
||||||
|
## Usage on Linux
|
||||||
|
|
||||||
|
### Checking out the repo
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone --bare gitea@git.theflyingfool.com:theflyingfool/dotfiles.git $HOME/.dot
|
||||||
|
alias dot='/usr/bin/git --git-dir="$HOME/.dot/" --work-tree="$HOME"'
|
||||||
|
dot checkout Linux
|
||||||
|
dot config --local status.showUntrackedFiles no
|
||||||
|
source ~/.zshrc
|
||||||
|
```
|
||||||
|
|
||||||
|
If there are conflicts:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mkdir -p .dot-backup && \
|
||||||
|
dot checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \
|
||||||
|
xargs -I{} mv {} .dot-backup/{}
|
||||||
|
dot checkout
|
||||||
|
```
|
||||||
|
|
||||||
|
### Managing dotfiles
|
||||||
|
|
||||||
|
**Adding or Modifying files**
|
||||||
|
|
||||||
|
```sh
|
||||||
|
dot add .zshrc
|
||||||
|
dot commit -m "Update .zshrc"
|
||||||
|
dot push
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage on Windows
|
||||||
|
|
||||||
|
### Checking out the repo
|
||||||
|
|
||||||
|
```ps1
|
||||||
|
PowerShell -NoProfile -ExecutionPolicy Bypass
|
||||||
|
git clone --bare https://git.theflyingfool.com/theflyingfool/dotfiles.git $HOME/.dot
|
||||||
|
if (!(Test-Path -Path $PROFILE)) {
|
||||||
|
# Create the profile
|
||||||
|
New-Item -Type File -Path $PROFILE -Force
|
||||||
|
}
|
||||||
|
"`nfunction dot { & git --git-dir=`"$HOME/.dot/`" --work-tree=`"$HOME`" @args }" | Out-File -Append $PROFILE
|
||||||
|
. $PROFILE
|
||||||
|
dot checkout -b Windows
|
||||||
|
dot config --local status.showUntrackedFiles no
|
||||||
|
"`n. `"$HOME/windows/Microsoft.PowerShell_profile.ps1`"" | Out-File -Append $PROFILE
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user