git log --oneline
will log commits in one line
git revert [commitHash, HEAD] --no-edit
will add commit to history that will revert commitHash commit
history will not be overwritten
git clean -f -d
will clean all untracked files and directories
git reset [--hard, --mixed, --soft] [commitHash, file, HEAD~N]
–hard will erase all
–mixed will move out from index
–soft will be visible only on another commit, and don’t move out from index
this will reset and make new commit and leaves the previous msg
git commit --amend --no-edit
if i stay on my feature branch and want to sync with develop lets say
git rebase develop
it will put commits in feature branch to tip of the main
merge develop into feature, overwrite history in my branch
other option
git merge develop
git rebase develop
Option number one
git reset --soft HEAD~3 // number of commits back grom the head
git add -A
git commit --no-verify -m "squashed"
git push --force // or iw work in one branch with teammates git push --force-with-lease
Option number two
In jetBrains products
Git -> popup on selected commits -> squash
Option number three
In Tortoise Git
Show Log -> Selected commits -> Squash // but here should be clean working tree
Connection to postgres
Adding ini file, for ex. Domain.Registry.Tests.ini
[HostConnectionSettings.Sections.|sbsmb|.{B3026AF7-6447-438B-897D-835ADBF020AA}.PG]
Ip=localhost
Port=5432
VendorHome=..\libpq
Login=DAF7528291F804C0F9CA0F0C1B8085E51D4AB8AEF226D194
Password=
Name=sbsmb
Connecting in the code
var LConns := Service<IConnections>(S_FD_PGId);
FConnection := LConns['sbsmb'];
Watch settings from ini in the code
var LSettingsPG := Service<ISections<IHostConnectionSetting>>.All.Values;
var LCount := LSettingsPG.Count;
For Oracle it will be IHostConnectionSetting in spite of IConnectionSetting
This difference only takes place when we use class of.
Good explanation of it is on the StackOverflow. I realized an example from SO below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
program VirtualConstructor; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; type TFirst = class constructor Create(); virtual; end; TSecond = class(TFirst) constructor Create(); override; // will shift to shis constructor for class of instances end; TFirstClass = class of TFirst; { TFirst } constructor TFirst.Create; begin Writeln('First'); end; { TSecond } constructor TSecond.Create; begin Writeln('Second'); end; begin try var firstClass := TSecond; var first := firstClass.Create; // will write 'Second' in case of virtual constructor var second := TSecond.Create; Readln; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. |
Good example lives here.
And here is first tryout – 2 apps, first loadind the second through Module Federation.
And there was a problem about order of loading, leading to the following error.
Key things are the following
app1 loads app2 like this
Continue reading