Created
January 17, 2016 06:15
-
-
Save lingtalfi/40729e4f6e4bf172a130 to your computer and use it in GitHub Desktop.
export local app using git command (personal memo)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Gitization du project local | |
cd "/path/to/myapp" | |
git init | |
git snap initial commit | |
copen .gitignore | |
<<< | |
.idea/ | |
conception/ | |
design/ | |
private/ | |
todo/ | |
videos/ | |
.gitignore | |
uploaded/ | |
>>> | |
git snap initial commit | |
### Export du site sur la machine distante | |
komin | |
(distant) | |
cd "/home/ling/websites" | |
mkdir myapp | |
cd myapp | |
(local) | |
_scp .git /home/ling/websites/myapp/.git | |
git remote add origin komin:websites/myapp | |
(distant) | |
git config receive.denyCurrentBranch ignore | |
git config core.worktree ../ | |
cp .git/hooks/post-update.sample .git/hooks/post-update | |
pico .git/hooks/post-update | |
<<< | |
#!/bin/sh | |
exec git reset --hard | |
>>> | |
(local) | |
(make some changes) | |
git snap first export commit | |
git pp | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment