![](images/banner.jpg)
Week 2 Project Management
This week we are going to built a ducumentation website for this course.
Weekly Assignment
- Work through a git tutorial
- Build a personal site in the class archive describing you and your final project
1 Work through a git tutorial
- 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 project management programes like Open Project .
- 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
- Version control manage histrory.
- Git
![](images/week1/pic1.png)
Download Git in Git for Mac
Some comment comands are below:git-log
Get 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 pull
git fetch + git merge against tracking upstream branch
git pull --rebase
git 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.
![](images/week1/pic3.png)
3 Download code editor Visual Studio Code
![](images/week1/0201.png)
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"edge.yinshui@163.com"
- Generate SSH key :SSH keys allow you to establish a secure connection between your computer and GitLab.
- 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 “git@gitlab.fabcloud.org:academany/fabacademy/2020/labs/oshanghai/students/nancy-wu.git”
- Edit my website:Open my local repository nancy-wu in Visualstudio code editor.
- Git Workflow:
cd nancy-wu
Open your local files.Git add *
Propose changes.git commit -m "Commit massage"
To actually commit these changes.git status
displays 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.git pull
is 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.git push origin master
To send those changes to your remote repository.- 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.
- 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.
- 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.
ssh-keygen -t rsa -C "edge.yinshui@163.com"
![](images/week1/0202.png)
![](images/week1/0203.jpeg)
![](images/week1/0204.png)
![](images/week1/0205.png)
![](images/week1/0206.png)
*Useful reference: GitLab docs
Problem 1
![](images/week 2/delate2.png)
![](images/week 2/delate.png)
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
![](images/week 2/filename.png)
Problem 3
Probelem 4
When I upload too many pictures , I can not push successfully. It shows like this.
![](images/week 2/pushfail.png)
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
![](images/week 2/ssk.png)
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.
![](images/week 2/problem5.jpeg)
Problem 6: git add * doesn't work , looks below:
![](images/week 2/1.png)
Then I use git status
![](images/week 2/2.jpeg)
Then I use git add ./
![](images/week 2/3.jpeg)
Sometime git add *
just doesn't work , when I use git add ./
, it suddenly works.
Problem 7 :
![](images/week 2/problem7.png)
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.