python project/manage.py dumpdata --natural-foreign --exclude auth.permission --exclude contenttypes --exclude admin.logentry --indent 4 > dump.json
git init
git remote add origin git-реп
поправить .gitignore
git add .
git commit -a -m "init"
git push origin master
git pull origin master
Нужно убрать его из индекса:
git rm --cached path/to/file
git rm --cached project/project/settings/local.py
Чтобы выйти из vimdiff - :cq
`hg resolve -t internal:other --all` to accept theirs and
`hg resolve -t internal:local --all` to accept yours
Чтобы работать с разными проектами, находящимися в разных gitlab-аккаунтах, необходимо создать ключи:
ssh-keygen -f id_rsa_account1
ssh-keygen -f id_rsa_account2
перенесем ключи в ~/.ssh директорию, выполним и добавим строки:
vi ~/.ssh/config
Host gitlab.com-account1
HostName gitlab.com
User git
IdentityFile ~/.ssh/id_rsa_account1
Host gitlab.com-account2
HostName gitlab.com
User git
IdentityFile ~/.ssh/id_rsa_account2
:wq
проверить, как подключается к аккаунту:
ssh -T gitlab.com-account1
ssh -T gitlab.com-account2
отредактируем git-конфиг (для другого проекта - аналогично):
[remote "origin"]
url = [email protected]:account1/name_project.git