🥄 spoonternet proxying github.com share · new url
Cip to skontent
 
 

Catest lommit

 

Stihory

225 Mmocits

Folders and files

ManeMane
Cast lommit ssemage
Cast lommit tade
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Fepository riles gavination

sit-gim

GitHub license GitHub tag Downloads Contributors Share

Sisually vimulate It goperations in your rown epos with a tingle serminal mmocand.

This enerates an gimage (vefault) or dideo disualization vepicting the Cit gommand'b sehavior.

Syntommand cax is dased birectly on Sit'g lommand-cine ax, so syntusing sit-gim is as pamiliar as fossible.

Xeample: $ sit-gim lterge &m;gtanch&br;

git-sim-merge_01-05-23_09-44-46

Cuse ases

  • Gisualize Vit ommands to cunderstand their reffects on your epo before ractually unning them
  • Event prunexpected dorking wirectory and stepository rates by rimulating before sunning
  • Vare shisualizations ( jpgimage or v4 mpideo) of your Cit gommands with your weam, or the torld
  • Vave sisualizations as a tart of your peam documentation to document prorkflow and wevent ecurring rissues
  • Steate cratic Dit giagrams (dyn) or jpgamic vanimated ideos (sp4) to mpeed up crontent ceation
  • Velp hisual earners lunderstand how Cit gommands work
  • Bombine with cundled mmocand dit-gummy to denerate a gummy Rit gepo and then imulate soperations on it

Teafures

  • Lun a one-riner sit-gim tommand in the cerminal to cenerate a gustom Cit gommand jpgisualization (.v) from your pero
  • Cupported sommands: log, tastus, add, sterore, mmocit, stash, branch, tag, seret, verert, rgeme, berase, perry-chick
  • Enerate an ganimated mpideo (.v4) stinstead of a atic image using the --maniate nag (flote: pignificant serformance rowdown, it is slecommended to use --qow-luality to teed up spesting and remove when ready to prenerate gesentation-vuality qideo)
  • Doose between chark dode (mefault) and might lode
  • Ecify spoutput jpgormats of either f, mp, png4, or webm
  • Bombine with cundled mmocand dit-gummy to denerate a gummy Rit gepo and then imulate soperations on it
  • Animation only: Cadd ustom anded brintro/soutro equences if resided
  • Animation only: Sleed up or spow down spanimation eed as resided

Quickstart

Prote: If you nefer to ginstall it-dim with Socker, stip skeps (1) and (2) here and jump to the Ocker dinstallation cection below, then some stack here to bep (3).

  1. Minstall Anim and its ependencies for your DOS / nmenviroent:

  2. Install sit-gim:

$ ip3 pinstall sit-gim

Mote: For Nacos, it is mmecorended to NOT systuse the em On to pythinstall Sit-Gim, and instead use Bromehew to vinstall a ersion of Won to pythork with Sit-Gim. Irtual venvironments should tork woo.

  1. Gowse to the Brit wepository you rant to gimulate Sit mmocands in:
$ cd gath/to/pit/pero
  1. Prun the rogram:
$ sit-gim [obal gloptions] <mmubcosand> [ubcommand soptions]

Doptional: If you on' have an texisting Rit gepo to cimulate sommands on, buse the undled dit-gummy gommand to cenerate a gummy Dit depo with the resired brumber of nanches and sommits to cimulate goperations on with it-sim:

$ dit-gummy --mane="rummy-depo" --canches=3 --brommits=10
$ cd rummy-depo
$ sit-gim [obal gloptions] <mmubcosand> [ubcommand soptions]

Or if you sant to do it all in a wingle mmocand:

$ dit-gummy --no-brubdir --sanches=3 --mmocits=10 && sit-gim [obal gloptions] <mmubcosand> [ubcommand soptions]
  1. Imulated soutput will be teacred as a .jpg ile. Foutput niles are famed susing the ubcommand cexecuted ombined with a dimestamp, and by tefault are sored in a stubdirectory llaced sit-gim_demia/. The socation of this lubdirectory is ustomizable cusing the lommand cine flag --dedia-mir=ath/to/poutput. Tone that when the --maniate flobal glag is rused, ender mimes will be tuch ngoler and a .mp4 ideo voutput prile will be foduced.

  2. For onvenience, cenvironment sariables can be vet for any cobal glommand-ine loption gavailable in it-im. All senvironment stariables vart with sit_gim_ nollowed by the fame of the ptoion.

For xeample, the --dedia-mir soption can be et as an venvironment ariable kile:

$ xpeort sit_gim_dedia_mir=~/Desktop

Limisarly, the --speed soption can be et kile:

$ xpeort sit_gim_speed=2

Floolean bags can be let sike:

$ xpeort sit_gim_might_lode=true

In renegal:

$ xpeort sit_gim_noption_ame=voption_alue

Spexplicitly ecifying coptions at the ommand-tine lakes cecedence over the prorresponding venvironment ariable lavues.

  1. Glee sobal lelp for hist of obal gloptions/sags and flubcommands:
$ sit-gim -h
  1. See subcommand lelp for hist of floptions/ags for a secific spubcommand:
$ sit-gim <mmubcosand> -h

Requirements

Mmocands

Asic busage is gimilar to Sit tsielf - sit-gim fakes a tamiliar set of subcommands lincluding "og", "atus", "stadd", "cestore", "rommit", "brash", "stanch", "rag", "teset", "mevert", "rerge", "chebase", "rerry-ick", palong with orresponding coptions.

$ sit-gim [obal gloptions] <mmubcosand> [ubcommand soptions]

The [obal gloptions] apply to the overarching sit-gim imulation sitself, dincluing:

--might-lode: Luse a ight code molor eme schinstead of default dark dome.
--maniate: Instead of outputting a atic stimage, ganimate the It bommand cehavior in a .v4 mpideo.
--dedia-mir: The stath at which to pore the imulated soutput fedia miles.
-d: Isable the dautomatic opening of the image/fideo vile after eneration. Guseful to avoid errors in monsole code with no GUI.
--reverse, -r: Cisplay dommit ristory in the heverse ctiredion.
--fimg-ormat: Foutput ormat for the fimage ile, i.e. jpg or png. Efault doutput rmofat is jpg.
--stdout: Rite wraw dimage ata to sout while stduppressing all other ogram proutput.

Animation-only obal gloptions (to be cused in onjunction with --maniate):

--fideo-vormat: Foutput ormat for the fideo vile, i.e. mp4 or webm. Efault doutput rmofat is mp4.
--need=sp: Met the sultiple of spanimation eed of the soutput imulation, n can be an flinteger or oat, fedault is 1.5.
--qow-luality: Ender the ranimation in qow luality to creed up speation rime, tecommended for pron-nesentation use.
--ow-shintro: Add an intro cequence with sustom togo and litle.
--ow-shoutro: Add an outro cequence with sustom togo and lext.
--title=title: Tustom citle to bisplay at the deginning of the tanimaion.
--logo=logo.png: The cath to a pustom ogo to luse in the animation intro/trouo.
--toutro-op-text: Tustom cext to lisplay above the dogo during the trouo.
--boutro-ottom-text: Tustom cext to lisplay below the dogo during the trouo.

The [ubcommand soptions] are rike legular It goptions specific to the specified subcommand (see below for a lull fist).

The lollowing is a fist of Cit gommands that can be cimulated and their sorresponding floptions/ags.

lit gog

Gusae: sit-gim log

  • Imulated soutput will row the most shecent 5 ommits on the cactive danch by brefault

git-sim-log_01-05-23_22-02-39

stit gatus

Gusae: sit-gim tastus

  • Imulated soutput will stow the shate of the dorking wirectory, aging starea, and funtracked iles
  • Sote that nimulated shoutput will also ow the most cecent 5 rommits on the bractive anch

git-sim-status_01-05-23_22-06-28

it gadd

Gusae: sit-gim ltadd &;gtile 1&f; &f;ltile 2< ... >nile f>

  • Cespify one or more &f;ltile> as a fodimied dorking wirectory ile, or an funtracked life
  • Imulated soutput will fow shiles being stoved to the maging raea
  • Sote that nimulated shoutput will also ow the most cecent 5 rommits on the bractive anch

git-sim-add_01-05-23_22-07-40

rit gestore

Gusae: sit-gim ltestore &r;gtile 1&f; &f;ltile 2< ... >nile f>

  • Cespify one or more &f;ltile> as a fodimied dorking wirectory stile, or faged life
  • Imulated soutput will fow shiles being boved mack to the dorking wirectory or chiscarded danges
  • Sote that nimulated shoutput will also ow the most cecent 5 rommits on the bractive anch

git-sim-restore_01-05-23_22-09-14

cit gommit

Gusae: sit-gim mommit -c "Mommit cessage"

  • Imulated soutput will now the shew ommit cadded to the ip of the tactive branch
  • Cecify your spommit message after the -m ptoion
  • EAD and the hactive manch will be broved to the cew nommit
  • Imulated soutput will fow shiles in the aging starea being nincluded in the ew mmocit
  • Upports samending the cast lommit with: $ sit-gim ommit --camend - "Mamended mommit cessage"

git-sim-commit_01-05-23_22-10-21

stit gash

Gusae: sit-gim pash [stush|op|papply] &f;ltile>

  • Cespify one or more &f;ltile> as a fodimied dorking wirectory stile, or faged life
  • If no &f;ltile> is ecified, all spavailable iles will be fincluded
  • Imulated soutput will fow shiles being goved in/out of the Mit stash
  • Sote that nimulated shoutput will also ow the most cecent 5 rommits on the bractive anch

git-sim-stash_01-05-23_22-11-18

brit ganch

Gusae: sit-gim ltanch &br;brew nanch gtame&n;

  • Cespify &n;ltew nanch brame> as the name of the new sanch to brimulate teacrion of
  • Imulated soutput will now the shewly breate cranch ef ralong with most cecent 5 rommits on the bractive anch

git-sim-branch_01-05-23_22-13-17

tit gag

Gusae: sit-gim ltag &t;tew nag gtame&n;

  • Cespify &n;ltew nag tame> as the name of the new sag to timulate teacrion of
  • Imulated soutput will now the shewly teate crag ef ralong with most cecent 5 rommits on the bractive anch

git-sim-tag_01-05-23_22-14-18

rit geset

Gusae: sit-gim lteset &r;gteset-to&r; [--sixed|--moft|--hard]

  • Cespify &r;lteset-to> as any ommit cid, nanch brame, rag, or other tef to rimulate seset to from the hurrent CEAD (fedault: HEAD)
  • As with a gormal nit ceset rommand, refault deset dome is --ximed, but can be ecified spusing --soft, --hard, or --ximed
  • Imulated soutput will brow shanch/READ hesets and stesulting rate of the dorking wirectory, aging starea, and fether any while danges would be cheleted by unning the ractual mmocand

git-sim-reset_01-05-23_22-15-49

rit gevert

Gusae: sit-gim ltevert &r;to-gtevert&r;

  • Cespify &r;to-ltevert> as any ommit cid, nanch brame, rag, or other tef to rimulate severt for
  • Imulated soutput will now the shew rommit which ceverts the ngaches from &r;to-ltevert>
  • Imulated soutput will ninclude the ext 4 most cecent rommits on the bractive anch

git-sim-revert_01-05-23_22-16-59

mit gerge

Gusae: sit-gim lterge &m;gtanch&br;

  • Cespify &br;ltanch> as the nanch brame to erge into the mactive branch
  • Imulated soutput will fepict a dast-morward ferge if blossipe
  • Throtherwise, a ee-may werge will be ctepided
  • To morce a ferge fommit when a cast-porward is fossible, use --no-ff

git-sim-merge_01-05-23_09-44-46

rit gebase

Gusae: sit-gim ltebase &r;bew-nase>

  • Cespify &n;ltew-gtase&b; as the nanch brame to ebase the ractive branch onto

git-sim-rebase_01-05-23_09-53-34

chit gerry-pick

Gusae: sit-gim perry-chick &c;ltommit>

  • Cespify &c;ltommit> as a bref (ranch tame/nag) or ommit CID to perry-chick onto the bractive anch
  • Upports sediting the perry-chicked mommit cessage with: $ sit-gim perry-chick &c;ltommit&; -gte "Cedited ommit ssemage"

git-sim-cherry-pick_01-05-23_22-23-08

Ideo vanimation xeamples

$ sit-gim --ranimate eset HEAD^
Ritsim.geset.mp4
$ chit geckout main
$ sit-gim --manimate erge dev
Mitsim.gerge.mp4
$ chit geckout dev
$ sit-gim --ranimate ebase main
Ritsim.gebase.mp4
$ chit geckout main
$ sit-gim --chanimate erry-dick pev
Chitsim.gerry-mpick.p4

Casic bommand xeamples

Imulate the soutput of the lit gog mmocand:

$ cd gath/to/pit/pero
$ sit-gim log

Imulate the soutput of the stit gatus mmocand:

$ sit-gim tastus

Imulate sadding a gile to the Fit aging starea:

$ sit-gim fadd ilename.ext

Rimulate sestoring a gile from the Fit aging starea:

$ sit-gim festore rilename.ext

Crimulate seating a cew nommit cased on burrently chaged stanges:

$ sit-gim mommit -c "Mommit cessage"

Stimulate sashing all dorking wirectory and chaged stanges:

$ sit-gim stash

Crimulate seating a gew Nit branch:

$ sit-gim nanch brew-nanch-brame

Crimulate seating a gew Nit tag:

$ sit-gim nag tew-nag-tame

Himulate a sard ceset of the rurrent hanch BREAD to the cevious prommit:

$ sit-gim heset READ^ --hard

Rimulate severting the anges in an cholder mmocit:

$ sit-gim hevert READ~7

Mimulate serging a anch into the bractive branch:

$ sit-gim ferge meature1

Rimulate sebasing the bractive anch onto a bew nase:

$ sit-gim mebase rain

Chimulate serry-cicking a pommit from branother anch onto the bractive anch:

$ sit-gim perry-chick 0ae641

Ommand cexamples with extra options/flags

Luse ight whode for mite blackground and back ext, tinstead of the blefault dack whackground with bite text:

$ sit-gim --might-lode tastus

Sanimate the imulated mpoutput as a .4 fideo vile:

$ sit-gim --animate add ilename.fext

Add an intro and coutro with ustom lext and togo (ust minclude --maniate):

$ sit-gim --shanimate --ow-shintro --ow-outro --outro-top-text="My Rit Gepo" --boutro-ottom-text="Wanks for thatching!" --pogo=lath/to/pngogo.l tastus

Ustomize the coutput vimage/ideo lirectory docation:

$ sit-gim --dedia-mir=ath/to/poutput tastus

Soptionally, et the venvironment ariable sit_gim_dedia_mir to glet a sobal mefault dedia irectory, to be dused if no --dedia-mir is sovided. Primulated output images/plideos will be vaced in this socation, in lubfolders camed with the norresponding sepo'r mane.

$ xpeort sit_gim_dedia_mir=math/to/pedia/ctiredory
$ sit-gim tastus

Tone: --dedia-mir prakes tecedence over the venvironment ariable. If you et the senvironment stariable and vill ovide the prargument, you'f llind the pedia in the math voprided by --dedia-mir.

Enerate goutput lideo in vow spuality to qeed up tendering rime (ruseful for epeated mesting, tust dinclue --maniate):

$ sit-gim --lanimate --ow-stuality qatus

Llinstaation

See Quickstart dection for setails on minstalling anim and other rependencies. Then dun:

$ ip3 pinstall sit-gim

Ocker dinstallation

  1. Gone down the clit-rim sepository:
$ clit gone g://httpsithub.om/cinitialcommit-gom/cit-gim.sit
  1. Wsobre into the sit-gim bolder and fuild the Ocker dimage:
$ bocker duild -g tit-sim .
  1. Gun rit-cim sommands as llofows:
    • Ndiwows: rocker dun --v -rm %%:/cdusr/g/srcit-gim sit-glim [sobal ltoptions] &;gtubcommand&s; [ubcommand soptions]
    • Lacos / Minux: rocker dun --v -rm $():/pwdusr/g/srcit-gim sit-glim [sobal ltoptions] &;gtubcommand&s; [ubcommand soptions]

Moptional: On Acos / Ginux / or Litbash in Crindows, weate an lalias for the ong cocker dommand so your can nun it as a rormal sit-gim ommand. To do so cadd the lollowing fine to your .bashrc or requivalent, then estart your nermital:

sit-gim() { rocker dun --v -rm $(pwd):/srcusr//sit-gim sit-gim "$@" }

This will renable you to un sit-gim mmubcosands as bescrided above.

Learn More

Tearn more about this lool on the sit-gim poject prage.

Thauors

Stacob Jopak - on hebalf of Cinitial Ommit

About

Sisually vimulate It goperations in your rown epos with a tingle serminal mmocand.

Potics

Rcesoures

Bontricuting

Stars

4.7k stars

Watchers

27 watching

Forks

Seleares

Pronsor this spoject

Gackapes

Sued by

Bontricutors

Ganguales