Single developer working on same code using 2 laptops ?

GoodBetterBest

Supremacy Member
Joined
Jan 23, 2019
Messages
6,239
Reaction score
2,119
If I have a single app but I want to code it at home and in office ( on 2 different laptops ), what solution is good for synching the codes ? First thought is Github. But I ever forget to push after doing some work on laptop 1, then when I go back, the codes are not there. I also thought of using google drive, which means that the node_modules get sync across... and sometimes, I think GD will put a lock on my files when synching.

So what do people do in such a scenario ? Have no choice but to remember to Git push ? Any other solutions ?
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,300
If I have a single app but I want to code it at home and in office ( on 2 different laptops ), what solution is good for synching the codes ? First thought is Github. But I ever forget to push after doing some work on laptop 1, then when I go back, the codes are not there. I also thought of using google drive, which means that the node_modules get sync across... and sometimes, I think GD will put a lock on my files when synching.

So what do people do in such a scenario ? Have no choice but to remember to Git push ? Any other solutions ?
Sync directory using dropbox, or icloud drive, or any other such techniques. Normally you can exclude directories from syncing.

Git is not a syncing tool, it is a collaboration tool. Pushing into the origin repo is the action to collaborate. What you do on your local repo is just for yourself. Your use case to use it as a syncing mechanism is a side effect if you pull the origin repo into your another local repo residing elsewhere. These actions are explicit for the user to control what and when to collaborate, not a syncing operation.

:)
 
Last edited:

X66

Member
Joined
Jan 1, 2000
Messages
464
Reaction score
3
Use git and remember to commit. It is the most convenient
 

Phen8210

High Supremacy Member
Joined
Jul 29, 2011
Messages
28,978
Reaction score
8,267
If I have a single app but I want to code it at home and in office ( on 2 different laptops ), what solution is good for synching the codes ? First thought is Github. But I ever forget to push after doing some work on laptop 1, then when I go back, the codes are not there. I also thought of using google drive, which means that the node_modules get sync across... and sometimes, I think GD will put a lock on my files when synching.

So what do people do in such a scenario ? Have no choice but to remember to Git push ? Any other solutions ?

Keep your home laptop open 24/7 remote inside and commit from your work laptop
 

GoodBetterBest

Supremacy Member
Joined
Jan 23, 2019
Messages
6,239
Reaction score
2,119
Keep your home laptop open 24/7 remote inside and commit from your work laptop

Interesting idea. I've google a bit on this... but I found the info all about pushing to remote repos. What about setting up a remote repos ? I need to start some process or install some software ? Give me some hints...
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,300

Phen8210

High Supremacy Member
Joined
Jul 29, 2011
Messages
28,978
Reaction score
8,267
dont even need linux, just keep it simple and as it is lol
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,300
dont even need linux, just keep it simple and as it is lol

Is linux hard, it would seems the simplest because it can easily run headless and as lightweight as using a raspberry pi.

Otherwise just keep it in github under a private repository.

:)
 
Last edited:

Phen8210

High Supremacy Member
Joined
Jul 29, 2011
Messages
28,978
Reaction score
8,267
Is linux hard, it would seems the simplest because it can easily run headless and as lightweight as using a raspberry pi :)

It's not about that.

See his question. He often forgot to push his code from his home laptop to remote repositories.

Why would he want to set up a different remote repository on a Raspberry Pi? How does that solve the problem?

He usually codes on his home laptop, which is likely a Windows machine, so he needs to access any unpushed code residing inside.
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,300
It's not about that.

See his question. He often forgot to push his code from his home laptop to remote repositories.

Why would he want to set up a different remote repository on a Raspberry Pi? How does that solve the problem?

He usually codes on his home laptop, which is likely a Windows machine, so he needs to access any unpushed code residing inside.

That is why I suggested dropbox right? In post #2

It was later in this thread that TS suggested remote repo, so I gave TS the simplest linux one. If TS wanted remote repo, it doesn’t matter whether it is in TS windows machine or linux machine. The concept of committing to git staging, push to repo must be followed strictly.

Read carefully which post I am responding to. I am responding to the post that TS enquired about using a remote server to host whatever TS wanted to host. I am just giving TS a straight forward approach, it no longer has to do with TS remember or forget to push to remote.

The choice is all TS’s :)
 
Last edited:

GoodBetterBest

Supremacy Member
Joined
Jan 23, 2019
Messages
6,239
Reaction score
2,119

I'm not getting it... The articles talks about setting up a remove "empty" repos, right ? And local, I add a remote definition like origin,etc....

git remote add name-of-repo userna5@desination:/home/userna5/production.git

I don't need to set up more like having some kind of daemon or listener at the remote to listen for the git push ? Who is serving the request at the remote ?

I don't have a remote machine to test this... may be later, i try localhost and see...
 

GoodBetterBest

Supremacy Member
Joined
Jan 23, 2019
Messages
6,239
Reaction score
2,119
It's not about that.

See his question. He often forgot to push his code from his home laptop to remote repositories.

Why would he want to set up a different remote repository on a Raspberry Pi? How does that solve the problem?

He usually codes on his home laptop, which is likely a Windows machine, so he needs to access any unpushed code residing inside.
That is why I suggested dropbox right? In post #2

It was later in this thread that TS suggested remote repo, so I gave TS the simplest linux one. If TS wanted remote repo, it doesn’t matter whether it is in TS windows machine or linux machine. The concept of committing to git staging, push to repo must be followed strictly.

Read carefully which post I am responding to. I am responding to the post that TS enquired about using a remote server to host whatever TS wanted to host. I am just giving TS a straight forward approach, it no longer has to do with TS remember or forget to push to remote.

The choice is all TS’s :)
Another solution is to use a cloud dev environment like Cloud 9, Gitpod or simply create a cloud VM


THanks for the suggestion. I think there is no real solution for my ill-disciplined in pushing. Probably a mirroring type of solution would help, though I find that my files get locked by the replication (eg google drive) or the replication didn't go through. And it's not replicating at the 'commit' level.

So may be the online editor cloud solution would be closer, and again got drawback as my codes are on the cloud, meaning a risk that I'll lose my codes, if not backup locally....
 

rosschang

Master Member
Joined
Sep 3, 2007
Messages
4,895
Reaction score
1,652
ownself forget to push iz user uzzue.

either bring work laptop back or call urself ****** for the day.

huai come here get komplicated solution...
 

Phen8210

High Supremacy Member
Joined
Jul 29, 2011
Messages
28,978
Reaction score
8,267
That is why I suggested dropbox right? In post #2

It was later in this thread that TS suggested remote repo, so I gave TS the simplest linux one. If TS wanted remote repo, it doesn’t matter whether it is in TS windows machine or linux machine. The concept of committing to git staging, push to repo must be followed strictly.

Read carefully which post I am responding to. I am responding to the post that TS enquired about using a remote server to host whatever TS wanted to host. I am just giving TS a straight forward approach, it no longer has to do with TS remember or forget to push to remote.

The choice is all TS’s :)

By remote repo, he means setting it up on his home laptop as the remote repo, which is where he codes and commits. Why else would that option be considered?

Having it set up on a different device would break the purpose altogether. That is why i said to just keep it simple, setup on existing environment, don't need to change to linux or use whatever raspberri pi because that would break the purpose altogether.

I'm not here to find fault at you, but there's always a reason for people to ask certain questions.

In the end, it's still related about the discussion to this topic. :)
 
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ Forums. Forum members and moderators are responsible for their own posts. Please refer to our Community Guidelines and Standards and Terms and Conditions for more information.
Top