Week 2 Project Management

This week we are going to built a ducumentation website for this course.

Weekly Assignment

  1. Work through a git tutorial
  2. Build a personal site in the class archive describing you and your final project

1 Work through a git tutorial

  1. What is prioject management? Project Management is about how you develop and document your project.For project management, you can use multiple tools to manage them in organized way.For example version control tools like git, RCS and CVS. You can also use blogs, wikis, documentation, content management systems. You might need video conferences, remote desktop tools, cloud computing. For many peole work together or long-term project, you also need priject management programes like Open Prioj.
  2. Project Management Principle: a)triage ruthlessly; b) demand- vs supply-side time management; c) spiral development; d) bottom-up vs top-down debugging; e)hierarchy; f)modularity
  3. Version control manage histrory.
  4. Git
Git: Git is the technology to help us to caliborate with people. It can track changes.Github/Gitlab are websties and an application that works with git.

Download Git in Git for Mac

Some comment comands are below:

git-logGet Git Manual

git add * Add the new content to the index.

git status Obtain a summary of which files have changes that are staged for the next commit.

git reset --hard HEAD^ Go back to last version。

git pullgit fetch + git merge against tracking upstream branch

git pull --rebasegit fetch + git rebase against tracking upstream branch

2 Build a personal site

1 Find my files on gitlab.I have learned some html befor, so I decide to use a HTML 5 template to build my ducumentation website.

2 Download HTML 5 template.

3 Download code editor Visual Studio Code

4 Git Setup : Adding an SSH key to your Gitlab account

  • User name: git config --global user.name "nancy.wu"
  • Email: git config -- global user email"[email protected]"
  • Generate SSH key :SSH keys allow you to establish a secure connection between your computer and GitLab.
  • ssh-keygen -t rsa -C "[email protected]"

  • Adding an SSH key to your GitLab account: Sign in http://gitlab.com.,select avatar in the upper right corner, and click Settings, then Click SSH Keys.Paste the public key that you copied into the Key text box.
  • Clone repository to create a working copy of a local repository projects
  • Copy and paste the link with SSH or HTTPS: Create a working copy of a local repository by running the command git clone “[email protected]:academany/fabacademy/2020/labs/oshanghai/students/nancy-wu.git”
  • Edit my website:Open my local repository nancy-wu in Visualstudio code editor.
  • Git Workflow:
    1. cd nancy-wu Open your local files.
    2. Git add * Propose changes.
    3. git commit -m "Commit massage"To actually commit these changes.
    4. git statusdisplays the state of the working directory and the staging area. It lets you see which changes have been staged, which haven't, and which files aren't being tracked by Git. Status output does not show you any information regarding the committed project history.
    5. git pullis used to fetch and download content from a remote repository and immediately update the local repository to match that content. Merging remote upstream changes into your local repository is a common task in Git-based collaboration work flows.
    6. git push origin masterTo send those changes to your remote repository.
    7. *Useful reference: GitLab docs

    Problem 1

    • First time when I use this website template I chang the CSS of text, and made a mess. All texts are in different sizes and styles. So I decide to update the whole website. The I delate all local files and replace them with new html and files in my laptop. It doesn't work I can't push them successfully. I go to gitlab and check it , all files are the same, when I change local file, git lab file didn't change. so I delate all files on gitlab too, then I can't push sucucessfully with my new local files.
    • I realize the problem is when I creat a same name local file , it doesn't connect with gitlab, so I clone ssh-key and have a new local file pull it from gitlab, this file work but I still can't push because changes I made are too big for one commit. I ask Elfe who is a great programmer for help, she taught me some git commends to solve this problems.
    • Repeal one commitgit reset --soft HEAD~1 I run this commend many times.

      Then in VS code unstage changes all files come back, then I start to commit agin one by one, each commit is smaller than 10M.

    Problem 2

    • Some pictures on my html are missing, but when I do VC code preview they are Ok . Instructor Saverio check my files and found I was namimg files in different format, some files are using big letter and some are small letters. So I compare git lab file name with my local files name and make them the same to fix this porblem.

    Problem 3

    • When I delate files on gitlab, I should not had delated pics, cause they are very big, I should just delate htmls. All commits will take some storage on Gitlab, so my website file is quite big now, that's something I can't fix.

    Probelem 4

    When I upload too many pictures , I can not push successfully. It shows like this.

    So I decide to set sskey again, I delated the old one and generate a new one , the copy new key with pbcopy < ~/.ssh/id_rsa.pub

    Problem 5

    This problem is really a pain in the ass, cause I spend more than 10 days and don't know what happend. Instructor saverio helped me fix it in the end. I did two things new.

    First, use git command ssh gitlab.fabcloud.org after clone. Then when I generate ssh-key, when it asks overwrite (y/n) , hit "y" like below. Then I suddenly can push. Even I still don't understand why I can't clone yesterday and before. Anyway it works now. I will learn more git after this.

    Problem 6: git add * doesn't work , looks below:

    Then I use git status

    Then I use git add ./

    Sometime git add * just doesn't work , when I use git add ./, it suddenly works.

    Problem 7 :

    Gitlab is really bad with VPN , when I go home, use my home's wifi ,it will not work with VPN. But you also need VPN, casue gitlab's server is in US, VPN will make it faster. So if you can not push, try turn on/ off VPN.