yuval.guide
About tilde expansion This post is based on the bash tilde expansion documentation. Let's say that you enter several letters, and them the ~ (tilde) character. If non of the letters are quoted, then bash will try to treat these letters as a login name. It will then try to replace the tilde expression with the home …
Read MoreAbout Brace Expansions This post is based on the documentation of bash brace expansion . Brace expansion is a mechanism that creates strings The basic syntax is: optional preanble (an opening string) a series of comma-separated strings or a sequence expression between a pair of braces optional postscript (a closing …
Read MoreShell Operation Covered here in bash documentation. The shell reads its input from one of these: an input from a file from a string supplied as an argument to the -c invocation option from the user’s terminal Breaks the input into words and operators, obeying the quoting rules described in Quoting These words (called …
Read MoreCreate a demo repository Create a new demo repository in github and clone twice: 1cd ../../a/demo/ 2git clone <your demo repository url> 3cd ../../b/demo/ 4git clone <your demo repository url> Create basic feature1 branch (same in both places) Create a feature1 branch in a and add something in it, then push. 1git …
Read MoreCreate Repositories Go to your github account anc create a public repository. (I have created one called demo) This is just a training session, so you will remove this repository when you're done. Locally, create a working directory (called demowork), and 2 directories under that: 1mkdir demowork 2cd demowork/ 3mkdir a …
Read MoreMerge Conflicts Preparations Use your previous knowledge to preoare the following: A repository called demo A branch called feature1 with: a file called file.txt The file has 3 lines with the following content (copy and paste exactly these characters): 11111111111 22222222222 33333333333 Make sure this is commited. Add …
Read MoreThis is a walkthroug. You are going to create a local repository, and do everything needed to push your work to a remote github repository. Create a local repository Create your local repository by typing: 1git init Config git user name and email (these are not github user and email): 1git config --local user.name …
Read MoreWhat is git merge Let's say you work in your local git repository, and you were doing some work in the work branch: 1$> 2$> git branch 3* work 4$> ls 5work1.txt 6$> You want to add something, but you are not sure it is going to be good, so you switch to a new branch (called new-work). The -b option instructs git to …
Read MoreBASH Arrays See here . Indexed arrays 1names[0]=Yoesf 2names[1]=David 3echo $names # will show: Yosef 4echo ${names[1]} # will show: David Assigning complete arrays. This is done by surounding a list of word with parentheses: 1-> girlz=(Betty Liza Jane) 2-> echo ${girlz[2]} 3Jane 4-> echo ${girlz} 5Betty 6-> or even: …
Read MoreUse this tutorial as an intuitive introduction. The go here and read more details. Why Branches Our repository from the previous example has 3 commits and 3 files. Let's say that this is a software project, and our code (those 3 files) is good, and we know we now want to do 2 things, that may conflict later: We want to …
Read More