[Cuis-dev] Code Stomping

Juan Vuletich JuanVuletich at zoho.com
Tue Mar 22 10:32:48 PDT 2022


On 3/22/2022 1:37 PM, David T. Lewis via Cuis-dev wrote:
> Hi Ken,
>
> On Tue, Mar 22, 2022 at 08:02:40AM -0700, ken.dickey--- via Cuis-dev wrote:
>> "git diff" only shows _uncommitted_ changes.  It would be great to have
>> a way to see committed but UNpushed changes, but I don't know how to do
>> that.
>>
> If you have a program called "gitk" installed on your computer, try using
> that. Navigate to your local Cuis git folder, then open gitk. This gives
> a nice display of the change history, including any recent commits that
> you have not yet pushed to the remote.
>
> Dave

That looks very useful!

But it doesn't tell about the remote repo, right? Ken, this kind of 
problems usually happen when the local repo is not updated to the latest 
remote. Although there is no way to give absolute guarantees, the risk 
is lower if the time between the last `git pull` and the `git push` is 
reduced to a minimum.

This is what I do to reduce the "risky time window" to a minimum:
1) Pull all repos
2) Work on my package. Never save the package or the image. File out 
'Unsaved changes to' changesets. Use them to review my own work daily.
3) When work is done, PULL ALL REPOS again. If my package was changed by 
someone else, then review my code and adapt. When done, PULL AGAIN, 
repeat 3 as needed!
4) Reaply my changes
5) Save package, commit, push.

Steps 3 to 5 should be done as quickly as possible. Usually in 15 minutes.

Someone may say "the CVS should do the work for you". In any case, doing 
as I said, I never lost code again. YMMV.

Cheers,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
https://independent.academia.edu/JuanVuletich
https://www.researchgate.net/profile/Juan-Vuletich
https://patents.justia.com/inventor/juan-manuel-vuletich
@JuanVuletich



More information about the Cuis-dev mailing list