Posts

Splitting Long Strings and Commands in Bash

ns=my_ns my_pod=pod-of-mine zuza='oppa doppa' # As a direct command. kubectl -n $ns exec $my_pod -- sh -c ' \ val="tram '"$zuza"' pam"; \ echo gu '"$zuza"' ga; \ echo la la "$val" la la;' # As a string command. # But use back-slash to make single line commands. my_command=' val="tram '$zuza' pam"; echo '$zuza' we use backslash here to make single line command \ echo la la "$val" la la;' kubectl -n $ns exec $my_pod -- sh -c "$my_command" The same on Gist Github

Ctrl+Shift+Right arrow doesn't work in Visual Studio 2019

Image
I can't select words to the right by using the standard shortcut Ctrl+Shift+Right arrow . By the way, words selection to the left with Ctrl+Shift+Left arrow works well. Probably, the ReSharper keyboard layout creates this trouble. I fixed it in Tools > Options window. Select Environment > Keyboard and past  Edit.WordNextExtend into the "Show commands containing" field. Then proceed as shown by the red arrows in the following image.

Continuous Integration, Delivery and Deployment driven by Git

I have it, I like it. This is the simpliest idea that removes excecive "must remember" and "must do" workflows in the software development process. Do you know Git Flow? This is all, your developers should know. You use a convention that reflects your development, test and production evnvironments. Say, you create Git-branches such as dev dev_stand test test_stand uat_stand prod_stand Farther, you tune your automation to react appropriately to changes in such branches. This is really easy in our days. This can be Project Buildings Obfuscation Static Code Analysis Unit Testing Packaging Deploying Data Updating from a production Notifications Integration Testing Other dev systems integration, etc.

Git Automated Conflict Solving

(draft, thoughts) Every Git repository is a separate universe. I mean, even your local repository may be considered as a primary remote repository at any time. So, how to merge two universes? By force, coercion and fire? Nope, USA is not applicable here, we always lose valuable pieces of work (world) in such a way. CoG Convention over Git approach is arising here. First you agree to only sync branches under a naming convention. You allow to push commits to your side repo freely and automatically until they do not conflict with yours. If they conflict, another side is free to do, say, a Git-rebase and retry. CoG deals with and separates notions of Non Fast Forward and Fast Forward commits of Git. See CoG link, to take it deeper. To recap, you are in an awkward position with your wishes, because this kind of things is uncommon in the Git world and is not researched well. That's all. Have questions?

Pure Git with Convention over Git

It is an implementation of remote Git repositories synchronization by the  pure Git and the Convention over Git . This approach uses well-known Git tools, because Git has an innate ability to do such synchronizations. All we need to add to Git is some convention. (Consider to use git-sinc , the next generation of remote Git repositories synchronization.) The situation Say, we have teams in separate companies. Each team owns their own repository hosted on their own separate git server. This often happens for vendor-client scenarios. The targets Create a single force, a single team. Eliminate severe and constant errors as a result of disunity. Eliminate significant time wasting. No single repository, no team's heart beating. P.S.: I even call this approach as Conventional Distributed Version Control System over Git.

Approaches to synchronize remote Git repositories

Pure Git Implementation: Pure Git with Convention over Git It uses pure Git techniques. This one is more academic but fully working. Has some limitations. Has the smallest amount of implementation dependencies. *nix & Windows ready. Stateless Analysis Implementation: git-sync The best approach. But it has more implementation dependencies: gawk, modern bash. *nix & Windows ready. Stateful Analysis It depends on collected information about Git refs. It has a wider set of conflict solving tools. Predecessor of all other approaches. Requires a modern software language, an IDE and good programming practices. Implicit Renaming of Refs My beloved. Belongs to the Stateless Analysis. It implies convenient manual conflict solving on the run. It is kinda Git inside the Git with an additional degree of external references.

Glossary of synchronization of remote Git repositories

Convention-Over-Git One of the approaches to automatically solve conflicts of synchronization between remote Git repositories. fast-forward safe, non-overwriting git fetch or push. non-fast-forward unsafe, forced & overwriting git fetch or push. side directly related one remote and many local git repositories. They are located on one side, i.e. in one company. owner owner of the side. A team that owns and uses their remote repository directly. refs git references, mostly such as branches and tags. conventional refs refs strictly separated by a convention and pertaining to different different sides. Each side owns its refs but can modify refs of another. prefixed refs This is a naming convention and an implementation of conventional refs by prefixes. As an example: " company1/ some_feature ", " company2- develop " where the " company1 / " and " company2 - " are the conventional prefixes. refspec