How to add and pull out a remote git repository to a project with lots of unbroken files

I'd love to work on a project on a laptop and deposit a common repo through wpbox. I have a lot of files that I do not want to embed in the git repository. How can I copy a project to another computer in this case?

I tried to use the widely used Dropbox external repo placement technique:

On the desktop:

git init
git add .
git commit -m "Initial commit"
git init --bare ~/Dropbox/git/myProj
git remote add db ~/Dropbox/git/myProj
git push --set-upstream db master

on laptop:

1) Copy all the project files from the desktop to the laptop ,

2) continue with git:

git init
git add .
git commit -m "Initial commit"
git remote add db ~/Dropbox/git/engme
git pull db master --allow-unrelated-histories

However, this causes an error:

error: The following raw tree file files will be overwritten by merging: ... Please move or delete them before you can merge. Aborting

Please, help...

, git pull . , , ... - - .

+4
1

, Dropbox. Dropbox git , init:

$work:# cd /Users/Work/Dropbox/MyProject
$work:# git init
$work:# git add .
$work:# git commit -m 'message'

.

, , Dropbox . Dropbox, . :

$peter:# cd /Users/Peter/Dropbox/MyProject
$peter:# git status

On branch master. Nothing to commit (working directory clean)

. , git, , . / .. - , .

, , - , - Dropbox.

, , , Dropbox, , , . , Dropbox ( , , ).

, Dropbox Dropbox, git, 'home':)

" " , , , . , , Dropbox . git , , .

0

Source: https://habr.com/ru/post/1652095/


All Articles