@@ -6,21 +6,86 @@ Principles, Practices and Project Management
# Project management
---
This week I learned about version control, web development using SSGs, and sketched out an initial final project idea.
## Git
## Version Control
Version control, is the practice of tracking and managing changes to software code.
Version control systems are software tools that help software teams manage changes to source code over time.
### What is Git?
---
Git is an open source distributed version control system.
GitLab is a web-based Git repository for faster and more efficient collaboration of software code.
FabAcademy uses a self-hosted version of GitLab on FabCloud at [gitlab.fabcloud.org](gitlab.fabcloud.org), which is were all projects related to the academies and student documentation websites are hosted.
#1 Setting up Git
Since I had already created used git before, I found my existing SSH key using `~/.ssh/id_rsa.pub`
This helps in tracking who makes the changes on the shared gitlab repo which is public.
Then I cloned the default repository on Gitlab to a local folder using:`git clone git@gitlab.fabcloud.org:academany/fabacademy/2020/labs/barcelona/students/mitalee-parikh.git`
#2 Basic workflow and repository structure
I've used git a little for my Master's documentation. But till now, just used some basic commands like:
`git init` to initialise a new repo
`git clone` Clone a repository into a new current local directory
`git init` Create an empty Git repository or reinitialize an existing one (starts a .git folder on local computer where all changes will be saved)
`git status` to check what's happening with the current directory
After making changes to files,
`git add .` to add all changes from the working directory to the staging area
`git commit -m "action msg"` to commit changes from the staging area to the local repo
`git push` to push changes from the local repo to the remote repo
`git commit -m "action msg"` to commit changes from the staging area to the local .git repo
`git push` to push only the changes from the local .git repo to Gitlab cloud repo
`git pull` to pull files from the remote repo to the local repo
I find this diagram very helpful to visualise the directory structure:

To learn more about branching, merging and other actions, I did a tutorial:[](http...)
Found my existing SSH key using `~/.ssh/id_rsa.pub`
Copied and added it to my FabCloud account.
Then I cloned the default repository to a local folder using:`git clone git@gitlab.fabcloud.org:academany/fabacademy/2020/labs/barcelona/students/mitalee-parikh.git`

Some other commands that might help:
`du -sh * ` to check file sizes
`du -sh * | sort -n ` sorts the files by size
`git help` for help with git commands
Git had very detailed error msgs, so it is advisable to read and follow them to find solutions with issues.
`git diff` Show changes between commits, commit and working tree, etc
`git log` Show commit logs
10Mb limit per commit
It is easier to undo a staged file, i.e. after git add
but more difficut to undo a commited file , after git commit, but still possible
#3 CI/CD
Continuous Integration complies websites with static site generators.
https://docs.gitlab.com/ee/ci/
#4 How does git work?
First it reads the YAML file .gitlab-ci.yml
## Web Development
---
I recently learned how to make a website using HTML, CSS with a Bootstrap framework. To develop my webpage, I wanted to explore different Static Site Generators before fixing on one. So I started by setting up both Mkdocs and Jekyll. Hugo was another option I want to look into in the coming weeks.