About

 25th January 2025 at 12:42am

This project is all about git and Github. It contains a lot of code and experiments interfacing Livecode with the git commandline tool, and the Github API. Our aim with this project is to empower the reader with both the understanding and the tools to start using git in their every day management of their work.

Inbox 0

Collect tasks in the Inbox

Collect tasks in the Inbox so you don't forget them, and get them out of your head quickly!

You can also press alt-C to capture from anywhere.

Projects

git

 25th January 2025 at 12:42am

Git is an important pillar of what we do in terms of version control, and asynchronous social editorial. We need to get the workflow right.

See also

Github

 21st January 2025 at 9:32pm

Github us an amazzing resource. It is owned by Microsoft. We should ensure we use Gitea as a fallback which should be OK as they are api compatible. Gitea should run nicely on a HomeLab setup.

Git Status Report

 22nd January 2025 at 12:00am

We use this Tiddler to display the latest Git Status.

Hello from Livecode!

Git Init

 25th January 2025 at 12:29am

We now start to get smart about git folders as we understand its simply an invisible folder we can check for.

Handlers

Handlers in model_Git:

--> Git | Init
-
function git_GetInit repoName
   -- put the git_Folder of stack projectName into gitFolder
   -- put git_GetCheckoutFolder (repoFolder) into repoRootFolder
   
   put git_InvisibleFolder (repoName) into gitInvisibleFolder
   return gitInvisibleFolder is not empty
end git_GetInit

command git_SetInit repoFolder
   put the defaultfolder into oDefault
   set the defaultfolder to repoFolder
   --
   put git_PathToCommandLine() into gitPath
   put gitPath & "git init" into someShell
   put shell (someShell) into sResult
   --
   set the defaultfolder to oDefault
   return sResult
end git_SetInit

command git_InitFolder gitRootFolder, pDontAdd
   put the defaultfolder into oDefault
   set the defaultfolder to gitRootFolder
   
   git_AddIgnore gitRootFolder
   
   git_SetInit repoFolder
   put the result into shellResult
   lcw_Notify shellResult
   
   get word 1 to 5 of shellResult
   if it is not "Initialized empty Git repository in" and it is not "Reinitialized existing Git repository in" then
      lcw_Notify shellResult
      set the defaultfolder to oDefault
      exit to top
   end  if
   
   if pDontAdd is not true then
      git_AddEverything gitRootFolder
      put the result into shellResult
      if shellResult is not empty then
         lcw_Notify shellResult
         breakpoint
         -- exit to top
      end if
   end if
   
   -- git_SetRootFolder gitRootFolder
   git_AddRootFolderToIndex gitRootFolder
   
   set the defaultfolder to oDefault
   return gitRootFolder
end git_InitFolder

command git_AddIgnore gitRootFolder
   text_AddTrailing gitRootFolder, slash
   put ".DS_Store" into gitIgnoreText
   put gitIgnoreText into url ("file:" & gitRootFolder & ".gitignore")
end git_AddIgnore

command git_RemoveDsStore
   put "find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch" into someShell
end git_RemoveDsStore