Remote Flying Fish Project Part 13: Get yourself a GitFollow article
In the first advanced chapter, do you remember that you’ve been provided with a GitHub link for Flutter example apps? If you are just starting to learn all these development framework and programming stuff, I suppose it’d be a bit hard for you. Hence, here comes this chapter to introduce you to the basic usage of git.
In a nutshell, Git is a versioning control toolkit, similar to Concurrent Versions System [CVS] and Apache Subversion (SVN). Among all, git is now the most popular one.
Anyways, Git helps to take a snapshot of your work whenever you push a commit. Thus, the platforms for holding your projects, which we call repository, allow us to download (or we usually use the word clone) projects made by other authors. The diagram below illustrates a simple structure of the versioning control system.
Assuming we are at v1.2, we integrated some features during the upgrade of v1.0 to v1.1 and started a trial of some other features. If ever in the future we need to adopt feature 1, or feature 1+2, or feature 1+3, we will still be able to access these unadopted source codes with the versioning control system.
In addition, in software development, we use do versioning following a rule like this:
Now let’s get to the installation of Git. A very simple thing to do.
- Go to https://git-scm.com/downloads and choose the suitable OS platform.
- Run the installer after download.
- Restart any command-line interface (CLI) if opened. You will then have the git command available in your CLI.
To test, input `git` and return. You should get the following output.
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] <command> [<args>] These are common Git commands used in various situations: start a working area (see also: git help tutorial) clone Clone a repository into a new directory init Create an empty Git repository or reinitialize an existing one ......
Then, we go back to the repository mentioned in the previous section https://github.com/iampawan/FlutterExampleApps
Click `Clone or download` at the right, and you will get the URL https://github.com/iampawan/FlutterExampleApps.git
The .git ending implies itself a git repository. Hence, we can now do
git clone [place the URL here, as a parameter of git clone command]
and then the project will be downloaded to your local storage.
To check the path location that you're currently browsing using CLI, type
pwd (for MacOS, a Linux command) or
chdir (for Windows DOS)
You may visit this website to see more of the commands reference for MacOS(Linux system) <--> Windows
Moreover, Flutter is actually linked up with git. You can change (either upgrade/ downgrade) Flutter version by doing this:
$ cd [path of Flutter root folder] $ git checkout [branch, tag or commit hash]
#for example git checkout v1.20.0
Browse the available Flutter version here: https://flutter.dev/docs/development/tools/sdk/releases?
To retrieve your Flutter root location, use
which flutter, trim the /bin/flutter part at the end and that's it.
And you are now good to go for the next few chapters, that we will go into the coding part and you will be able to access the repository that contains the complete source code in the last chapter. Stay tuned.
Parts in this series
- Remote Flying Fish Project Part 1: Introduction
- Remote Flying Fish Project Part 2: DIY Series - Arduino Testing
- Remote Flying Fish Project Part 3: Motor Testing
- Remote Flying Fish Project Part 4: Bluetooth Testing
- Remote Flying Fish Project Part 5: Motor Testing with Remote XY
- Remote Flying Fish Project Part 6: PCB Design (preparatory)
- Remote Flying Fish Project Part 7: PCB Design (Schematic)
- Remote Flying Fish Project Part 8: PCB Design (PCB Layout)
- Remote Flying Fish Project Part 9: Soldering and Arduino Programming
- Remote Flying Fish Project Part 10: Flutter Introduction
- Remote Flying Fish Project Part 11: Flutter Installation on MacOS
- Remote Flying Fish Project Part 12: Flutter Installation on Windows
- Remote Flying Fish Project Part 13: Get yourself a Git
- Remote Flying Fish Project Part 14: Flutter UI Design
- Remote Flying Fish Project Part 15: Bluetooth in Flutter
- Remote Flying Fish Project Part 16: 3D printing for propeller protector
- Remote Flying Fish Project Part 17: Flight Test and Fine-tuning