Working with git from 2 laptops with no bare repo

前端 未结 4 2057
长发绾君心
长发绾君心 2021-01-06 11:26

I\'ve started project in my first laptop. git init, and start working. Tomorrow i\'m going to vacations. I want to take with me my smaller laptop.

And work with pro

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-06 12:19

    On the big laptop machine, you should do a "git pull", pulling changes from the small laptop into the big one.

    While you may do "git push" from the small laptop, but because the repository on the big laptop is not a bare one, you would also have to do a "git checkout" or "git reset" on the big laptop to sync with the pushed changes, with the possibility of encountering conflicts if there are modifications to the big laptop repository.

提交回复
热议问题