Most popular:
GMail: Invalid server certificate (The certificate cannot be used for this purpose).
For a couple of days now every now and then I cannot load messages from GMail accounts. Other people report that other things also may not w...
How to set Brave profile name and picture?
For a long time I've been using Chrome (earlier on I used Opera ), mainly because of laziness (i.e. its fantastic synchronization featu...
The update on Watch 4 Idle (working or not?).
update (...at some nice day of September 15 :) (14:23)) : ,,,on even more optimal time interval - on the very end of this post. As I men...
search this blog
Freshly into Git.
..traces left on one fall 2019 afternoon...
Freshly into Git.
updated ...at some nice day of November 26
(2:37 ᴘ.ᴍ.) ...Table of Content as well as a small update on pushing commits.
- Quick survey on what’s coming:
- Why I find GitHub appealing?
- Nomenclature confusion.
- What finally convinced Me?
- How to easily use GitHub on Windows?
Why I find GitHub appealing?
It all began with Handy News ReaderFeature-rich RSS reader for Android. - an Android app which development I am involved since late 2017. The developer highly recommended GitHubWhat is GitHub? as the destination place for sharing new ideas, reporting bugs, etc. Besides, it was also the right place to grab any new release of the app - even before it landed on Google Play/F-Droid.
But I Myself am not a developer, I rarely consider Myself a programmer even - so the whole GitHubGitHub homepage. thing (first impression) seemed to Me pretty... weird and alien. I was intrigued, however, why it gained so much praise and interest, and how it really works, what so special about it?
What was especially intriguing was the time I heard about (even weirder?) thing called "GitWhat is Git?", and learned (kind of) that it has some connections with a command-line-type of a workflow, which I've already known how powerful it can be (out of My earlier GNU/Linux experience, when I was totally amazed by the possibilities of such a inconspicuously looking thing like terminal/shell themselves).
Nomenclature confusion.
First I felt confused by "terminal", "shell", "command prompt/command line", "Bash/PowerShell", and so on - because all of those terms seemed to be associated with the same single thing. HereThe difference between 'terminal', 'shell', and other potentially confusing terms., however, it has been fantastically explained and I hope that now I have better comprehension of the matter, which boils down to this (at least to My understanding):
- command line/command prompt - this means a sole way of interacting with a computer, in which You enter some text commands and then computer replies,
- shell - this is a program which runs in background and allows to use other programs of Your liking,
- Bash/PowerShell - those are just examples of shells: Bash is widely known throughout GNU/Linux world, PowerShell stands for its Windows counterpart,
- terminal - this is a program which provides a command-line "graphic" interface for a shell (so terminal is responsible mainly for how Your text commands will look like visually on the screen - while shell is responsible for how all of those commands will be working);
The most impressive I found the way You could grab and install new apps under GNU/Linux: there were no need to google Your desired app's homepage, no need to download its installation file, and no need to go through several windows to finally install it. Instead, You could literally enter a simple single command within terminal, confirm it and voilà (!) - it was all it needed to make magic happen (!!!). "It" somehow knew out of where to grab the app and how to install it on Your PC without bothering You (or at least minimizing this to a high degree). Moreover, You could gather multiple apps in one longer - but still single - command, and therefore to delegate their installation at once. It was so amazing that I hardly believed it .
Soon I learned that there are many more things You could do much simpler and faster just via inconspicuous text commands. I even harnessed AutoHotkeyAutoHotkey - the ultimate automation scripting language for Windows. under Windows 7 to improve My workflow in this spirit (i.e. replacing frequently performed actions by a set of commands, or even better: a keyboard shortcut to initiate all of them at once, without a need to enter anything).
Back to Git(Hub), I learned that the whole thing may not be only useful, but also operated through the same super-fast-and-easy-command-line-driven-way . It means that You don't need to log-in into Your GitHubGitHub homepage. account every time You need to use it - You don't even need to open Your web browser (!). All You need is a couple of simple commands to enter into a terminal window and confirm - that's all: You have the same result, but much more simpler and quicker (which still amazes Me).
What finally convinced Me?
As I mentioned before, I'm not consider Myself as a "full-blown programmer" or a developer. Nevertheless, as soon as I became aware of GitHubGitHub homepage. potential and especially, that it's universal and may be applied to many different things as well as to the programming itself - I've found that it could significantly come in handy when it comes to My vocabulary projects (two sets of vocabulary: one which consists of English idioms for Polish students - and the other which consists of Polish 'extended' vocabulary for Polish themselves).
I systematically update both collections (adding new items, improving the existing ones) - official releases are published every three months, but in practice I do the updates locally every couple of days (about once a week). GitHubGitHub homepage. might be great, I thought, to track those updates and allow each interested person to grab "the newest and hottest" version . So I've decided to switch from archive.org to the GitHubGitHub homepage. itself, to host My, so-called, Anki decks (AnkiLearn by heart surprisingly easily and fast. is a fantastic Android/iOS/Windows/GNU/Linux app to learn anything by heart).
There was one little concern, however: GitHubGitHub homepage. platform seems to be clearly dedicated for software developers - so I hasn't been sure that it is 100% fine to harness it this new unconventional way to host anything other than programming code. The other day I've stumbled upon a fantastic article on GitHub for novel writersHow Writers Can Use GitHub to Store Their Work? (!) - which has totally cleared the picture, providing the information that GitHubGitHub homepage. itself encourages its users to benefit from the platform many other - i.e. non-programming - ways. Furthermore, this theme takes place for years now (read this very interesting articleDive into in-depth story behind GitHub., which tells a lot about many other ways of incorporating GitHubGitHub homepage. into Your Own workflow/creation, making life easier and widening possibilities). So now I've gained more certainty that My particular case is not "unique", but even welcomed . This finally convinced Me to take first steps into the GitGit homepage., GitHubGitHub homepage. and all the necessary stuff (for Windows users), which I describe below.
How to easily use GitHub on Windows?
To use GitHubGitHub homepage. the super-easy-fast-and-'magical' way powered by command line under Windows, You need to install two things: GitGit homepage. and CygwinWhat is Cygwin?.
I. Install Git.
You may consider GitGit homepage. as "the engine" or "the core" on top of which GitHubGitHub homepage. has been designed. It's GitGit homepage. that is responsible for tracking Your work's development and managing teamwork (if such one exists). Interestingly enough You could stick with GitGit homepage. and totally do without GitHubGitHub homepage., still having the whole multiple version tracking feature at hand. You may find GitHubGitHub homepage. useful when it comes to working on different devices/locations and keeping Your project always up-to-date - all of that without a need of establishing online access to Your project by Yourself (moreover, GitHubGitHub homepage. provides You with a whole web interface to manage many GitGit homepage.-related things out of the box). In many ways using GitHubGitHub homepage. resembles syncing files through the cloud (like Google Drive, for example) - the main difference is that, on top of syncing, You have a dedicated "dashboard" (in a form of a website) which 1) nicely visualizes Your Git(Hub) usage (whenever You work alone or in a team, You gain a pretty clear "big picture" of its growth, including potential alternatives for some of its components) and 2) allows You to perform Git-related actions by clicking 'here and there' instead of typing commands.
II. Install Cygwin.
Although Windows already has its own terminal and shell, it doesn't support GitGit homepage.-related commands necessary to use it. Fortunately, You can fix this by installing CygwinCygwin homepage. and performing a simple operation, thanks to which Windows suddenly will become more "in the know" (as far as GNU/Linux commands are concerned) ;) . Without diving into technical details, let's install the thing and perform the magic !
Installation process is simple: although there are plenty of custom options to choose - You can simply go through most of them not changing anything. This articleHow to Use Cygwin? will lead You through the installation process step-by-step.
III. Enrich Windows command prompt with GNU/Linux commands.
Once You've installed CygwinCygwin homepage. You can move to the most interesting part which will make Windows classic command prompt smarter. One way You may notice the difference is to try some GNU/Linux command before and after You perform the procedure. Open the command prompt and type pwd, then confirm. Currently Windows should not understand it (You can learn more about CygwinCygwin homepage. commands hereHow to Use Linux Commands in Windows with Cygwin?). Close the terminal window and do the following:
- Open Your system properties with Win+Pause/Break keyboard shortcut.
- In the left column click on Advanced system settings.
- From the Advanced tab, click on Environment variables at the bottom.
- Then in the system variables, locate the path variable and click edit.
- At the end of the variable value option, add the following (if You installed everything by default, it should look this way):
;C:\Cygwin\bin
Make sure you add a semicolon to separate it from the other values.
- Confirm by OK.
Now You can check out if everything works right, using the same pwd command as before: open the terminal and try again - now, instead of an error message, as a result You should see Your current directory written on the screen.
IV. [optional] Prepare the command prompt.
I'd like to present You two ways of making things easier when it comes to working with the terminal. They are not necessary to incorporate - but You may find them worth Your attention.
Enable copy&paste on Windows <10.
Instead of carefully typing each command You might prefer to simply copy&paste it directly into the terminal window. But if You use Windows 7, You may be surprised that classic ctrl+v keyboard shortcut does not work. Instead, You can either right click within terminal window and choose Paste - or enable QuickEdit Mode and simply right click each time You want to paste something (to enable this feature: right-click on the window's title bar › Properties › the Options tab › check the QuickEdit Mode option under Edit Options › confirm by OK.).
Start the terminal directly within Your project folder.
By default whenever You open terminal window, it starts within the default directory C:\Users\Your user name here, so You need to navigate to Your project directory every time You want to apply some GitGit homepage. action to it. This navigating may often require a couple of additional steps which You can skip if You make the terminal starting automatically within Your project directory.
To do so:
- Right click on Your Windows desktop and choose New › Shortcut.
- Fill the empty field with cmd.exe and click Next.
- Enter the name You'd like for Your custom terminal shortcut. A good idea may be to choose a name which is related to Your project.
- Confirm by Finish/Done.
- Right click the shortcut You've just created and choose Properties (or simply select it and use alt+enter).
- Fill the Begin with field with Your project directory.
- Confirm by Apply and OK buttons.
Now, launch Your terminal shortcut to find out if it really starts withing Your project folder.
V. Identify Yourself.
GitGit homepage. requires to set up Your user name and e-mail address. You can use any user name, but when it comes to email address - if You use GitHubGitHub homepage., You should use the same email as You have set up within Your GitHubGitHub homepage. profile settings (Settings › Emails › Primary email address). If You want to make Your email address private, check Keep my email addresses private within settings section mentioned above. Then take a closer look on this option's description, it should be something like that:
"We’ll remove your public profile email and use 26142231+ThomasLeigh@users.noreply.github.com when performing (...)."
Copy that email address from Your GitHubGitHub homepage. settings page to further use within GitGit homepage. itself.
Another thing: still within the same settings section uncheck Block command line pushes that expose my email - this step may be necessary to use GitGit homepage. via command line.
Now let's open Windows command prompt and type (or copy&paste):
git config --global user.email "Your email address here"
Confirm it and then:
git config --global user.name "Your user name here"
After You confirm those steps, You don't need to repeat them anymore - regardless of how many new projects You will add to GitGit homepage.. If You, however, would like to change Your user name, for example - You can do it at any given moment via the same command mentioned above.
VI. Activate Git within desired folders.
Now, having all the pieces up and running, You can make GitGit homepage. working for Your project. In order to do so:
- Open terminal (if You've created - described in part IV - custom terminal shortcut specifically related to Your project, use it now).
- If You haven't created custom terminal shortcut - navigate to Your project directory (using cd command - e.g. cd folder1/folder2/etc.; to change drives just type d: (in case of d drive) and confirm).
- Enter this command:
git init
VII. Connect with GitHub.
Now You need "to mirror" Your project directory onto GitHubGitHub homepage.. If You don't have a GitHubGitHub homepage. account yet - now it's a good time to create one. Once You have it done, create a new repository (a + icon on the top right) - which will be Your project's mirror. While setting it up, uncheck "Initialize this repository with a README" - it will make further steps easier.
Take a closer look on the specific address with which You'll be provided during Your repo creation: it should look like that:
https://github.com/YourUserName/YourRepoName.git
Note or copy this address. Now, open the terminal, navigate to Your project folder (or simply use Your custom terminal shortcut) and perform the following command:
git remote add origin https://github.com/YourUserName/YourRepoName.git
VIII. Gain a routine.
Once You have everything set up, You can incorporate it into Your workflow. Each time You'd like to "snapshot" Your work current state, You may use those commands:
[optional] git pull
https://github.com/YourUserName/YourRepoName.git
Download Your project data from the GitHubGitHub homepage.. This command may come in handy when You'd like to continue working on Your project using other device, so You need all things to be up-to-date. In such a case first perform the instruction below from step 1 to 3, then - on the other machine - add this extra 0 step.
git add .
Prepare an update which consists of all the changes within Your project directory (remember the period at the end).
If You want to include only selected files, You can do that as in the following example:
git add file1.txt file2.txt etc.txt
- git commit -m "Your comment here."
Save the update (locally, i.e. only on Your computer) alongside with Your comment (this comment should describe Your update as a whole - there is no way to separate commenting each and every file within the update).
Often it is a good idea to comment updates the way which could be understandable for You months (or years?) from now.
- git push -u origin master
Upload the update to the GitHubGitHub homepage..
In this step use “-u” only one time - every next time You can do without it.
An example of Git session.
Now, in case You've uploaded more than one file at once, if You take a look on Your GitHubGitHub homepage. repository page (https://github.com/YourUserName/ProjectName
), You'll notice that each of the uploaded files is accompanied by the same comment message You've provided while committing. The reason is that comment messages included in git commit -m command relate to the update as a whole - not to the particular files which it consists of. You can gain much clearer picture, however, if You enter the x commits bookmark (x = the current number of Your commits).
No comments:
What do You think?
I'm a web&graphic designer:
current reading:
upcoming reading:
tools I recommend [a-z]:
interesting app packages:- NirSoft - small, fast, portable, and highly useful.
- NTWind Software puts a special emphasis on usability and feature set.
- LeeLu Soft delivers high quality freeware utilities, system tweaks and freeware arcade games.
Windows:- Anki - memorizing never has been so easy and convenient
- AudioSwitch - s.f.-like volume control and multiple sound cards. why?
- FileZilla
- GoodSync
- jDownloader
- Kodi
- Notepad++
- Open Live Writer
- Pidgin
- PureText
- Screamer Radio
- convert (to) audio files between various formats: TAudioConverter
- The Bat! - a geek-friendly ;) powerful e-mail client
- use Your smartphone as a wireless mouse and keyboard, and a universal remote - Unified Remote
- Your preferred workspace by one click!: WiLMa - automatically positioning and resizing all Your windows
- Wireless Network Watcher
Android:- AnkiDroid - memorizing never has been so easy and convenient
- AquaMail
- CoolReader
- stay in touch with all Your interests with Handy News Reader
- Fing
- MacroDroid
- Meditation Assistant - the tool which helped Me to turn meditation practice into habit
- use Your smartphone as a wireless mouse and keyboard, and a universal remote - Unified Remote
- Wallpaper Changer
Internet radio:- 06am Ibiza Underground Radio
- Abacus Ocean
- laut.fm Schattenreich - The Gothic Radio
podcasts:- The Unexplained
articles I find worth-reading [a-z]: