-
First get to the existing directory
$ cd my/folder/ -
Now start a new git repository
$ git init -
Identify if the current elements on the directory are needed or not and add them to the .gitignore file. When ready...
$ vim .gitignore -
When ready create the first commit on the server
GNU readline is a commonly used library for line-editing; it is used for example by Bash, FTP, and many more (see the details of [readline][5] package under "Required By" for more examples). readline is also customizable (see man page for details).
Keyboard Shortcut Description
Ctrl+l
Clear the screen
My preferred code style is 2-space K&R. This is intended to provide a justification for this style.
K&R style has the following properties:
- Provides symmetric size (in terms of screen space consumed) between the opening and closing syntax of a clode block.
- Forces no empty or meaningless lines, thereby avoiding artificial distance between related things that should be together.
- Consumes the minimum vertical space while keeping the opening and closing syntax of a block on separate lines from the content.
| # Usage: | |
| # - Start new mindmap: | |
| # `ruby ttymindmap.rb` | |
| # - Open Freemind format MM mindmap: | |
| # `ruby ttymindmap.rb <PATH-TO-MM-FILE>` | |
| # | |
| # Press `h` key when running for help. | |
| require 'nokogiri' |
See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
Installing and using Visual Studio Code and g++ (plus other tools) for (re)learning programming (and some entertainment purposes) - Part 1 - Windows 10
Recently (actually not so recent...) I wanted to refresh my programming (and logical) skills. So I thought to try some available tools. I was not looking for professional tools, but for something - such an IDE - easy to use, ideally with a lot of help included. (still longing for something like the almost forgotten Turbo C and Turbo Pascal.)
I tried (and still using somewhat) CodeBlocks (http://www.codeblocks.org/ - works on Linux, Windows, MacOS). For educational purposes it is very simple to setup, one have to just download and install the version that contains the mingw tools. More details on their site. It is also easy to use, almost straightforward. Nonetheless, it can also deal with bigger projects.
I also tried NetBeans (https://netbeans.org/ - also working in Linux, Windows and MacOS) and DevC++ (https://sourceforge.net/projects/orwel
I tried the WSL and it isn't quite seamless enough for me. I ran in to problems when editing in VSCode and having watchers on my files (ng serve, dotnet watch run, etc.). In addition, I kept running in to problems that only manifest themselves when running in WSL. For example, this issue with doing production builds and the terser plugin has made many a developer rage-quit on using WSL. Just figuring out that it was an issue with the WSL took a lot of time.
That terser plugin issue was never resolved and I ended up having to keep a git bash window open in addition to my WSL console window so I could do production builds. To make matters worse, my npm packages were platform-dependent so I couldn't use the same project folder. So, my procedure was: commit whatever changes to test branch, push to repo, git pull on my "windows" project folder, and do a production build there
Note: This works all except for the shell script part. Need to figure that out. You can do it interactively just not from the command prompt.
- Install Git
- Install Git Bash via Git Tortoise install
- Added HOME=/c/Users/$USERNAME to C:\Program Files\Git\etc\profile
- See https://stackoverflow.com/questions/32232978/change-the-location-of-the-directory-in-a-windows-install-of-git-bash
- Download rsync.exe from https://repo.msys2.org/msys/x86_64/rsync-3.2.3-2-x86_64.pkg.tar.zst use 7-zip to decompress
- See https://blog.tiger-workshop.com/add-rsync-to-git-bash-for-windows/
- Put rsync.exe into C:\Program Files\Git\usr\bin
- Open Git Bash and create a key file using ssh-keygen
| # put this in your .bashrc or .zshrc | |
| fd() { | |
| preview="git diff $@ --color=always -- {-1}" | |
| git diff $@ --name-only | fzf -m --ansi --preview $preview | |
| } | |
