Skip to content

EsdeathYZH/FinalProject-school-plants

Repository files navigation

Project:School-Plants in SJTU

Programming language:Java、Android
IDE:Android Studio

Git Workflow

I.Create repository in Github

Find the repository you want to contribute and fork it. Or you can click the "new" button to create your own repository.

II.Write your own code and commit

1.If your repository is created by you,you can enter the dictionary by "cd" command.Then input "git init" to create local repository.

2.If your repository is forked from another repository.Your need to use"git clone" to clone remote repository to the current dictionary.

3.Coding and coding.....

4.Use "git remote add origin https://github.com/EsdeathYZH/FinalProject-school-plants.git" to create remote repository.

5.Input "git add ."to add the infomation of files to the index database.Your can also use "git reset HEAD file" to give up your changes from the index database.Then you can use "git checkout -- file" to give uo your changes from your project dictionary.

6.Use "git commit" to commit your change to your repository.Use "git commit -m"some comments" " to make some comments on this commit.

7.Use "git push <remote repository> <local branch>:<remote branch>" to push your repository to remote repository.For example:"git push origin master"

III.Pull request

This step occurs when your remote repository is forked from another.

1.If your want to commit your change to the origin repository.Your need to pull request.

2.Now the owner of origin repository can check your commit.If there is no conflicts,it means your changes can automatically merged into origin repository.

3.Every time you begin coding, you can use "git pull <remote repository> <remote branch>:<local branch>" to update your project."git pull" equals to "git fetch"+"git merge".

About

FinalProject-school-plants created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages