I have a clone from a remote repository, and i do my work on this clone and does git commit and git push to remote repo.
I work using a desktop PC and some times using a laptop. From laptop now I do remote desktop to my desktop PC and work. But if I can create a local repository in my desktop PC using the above clone, and create clone from this local repository on my desktop and laptop. So i can do git push to my local repository on desktop from my desktop and laptop. I don't want to do git push to remote repository until my work is complete. Once it is finished I can push my changes to remote repository.
Is this possible ?
To accomplish this I did the following steps.
- Created a local bare repository using git init --bare, let us call this as L
- cloned L and we can call this as L1
- Inisde L1, i cloned my remote repository R
- After this my plan was to commit & push everything under L1
- So even R will be available in my local repository L.
- Then clone L to L2 on my desktop and L3 on my laptop, work on L2 and L3 and push the changes to L.
- Once the changes are safe to push to remote, then pull the changes from L to L1
- This (step 7) will bring the changes to R, so commit and push the changes from R to remote repo.
This was the plan and i could do up to step 3. I am unable to complete step 4. Unable to commit R to L. It when i do git status, i get the following
~/ws/GL00MG1/LR00MG (master *=) > git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) (commit or discard the untracked or modified content in submodules)
modified: B_FOLDER (modified content, untracked content)
no changes added to commit (use "git add" and/or "git commit -a")