Skip to content

A project for practice using git during group projects, with this repository being the project manager

Notifications You must be signed in to change notification settings

Uduru0522/Group-Project-Practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Group-Project-Practice

A project for practice using git during group projects, with this repository being the project manager.

Sources

This repo follows the method written by sir Andrew Matheny's This Medium Post. All credits goes to him.

Basic Consepts

The project will be managed as the folloing image: image

with you acting as the group member, forking and sending pull request to this repositiory.

Steps

First of all, setup git.

If you are on Linux:

Use the command sudo apt-get install git to install. Type git --version to confirm.

If you are on Windows:

Get GitBash and install. After install, you should be able to open a command prompt through the .exe file.

Config setup

Then use the following commands to setup user.name and user.email. It is used to identify commits.

git config --global user.name "<Your name>"
git config --global user.email "<Your email>"

As the group member:

  1. Click Fork on the main repositiory.

Now you should have your own fork.

  1. Clone the forked repositioy with git clone https://github.com/ <Your GitHub ID> /Group-Project-Practice.git.

Now you should have the forked repository on your local machine. Use the command ls to confirm.

  1. Use command git remote -v. You should see a remote named origin.
  2. Use command git remote add upstream https://github.com/Uduru0522/Group-Project-Practice.git

This is to set connection to the main project. This way you can pull updates on the main repo. (The arrow labled "C")\

  1. Make your changes and commit. The instructions on properly making change on projects are at below.
  2. Run git push origin main to push changes to your fork.

You should be able to see the updates on https://github.com/ <Your GitHub ID> /Group-Project-Practice

  1. At the website, click "Send Pull Request". After the project manager merges, you can see the changes on main repo.

When making changes

Beforing making changes, you should fork and clone the repositiory, and set up the upstream to the main repo (~step 4 of above). Then:

  1. Update local with central repo. (git pull upstream main, This is step 5 of the above steps)
  2. Set up a new branch with git branch <new branch name>. Always keep the master branch a runable thing
  3. Switch to the created branch with git checkout <new branch name>
  4. Make code edits. You can use git status to see what changes are made.
  5. Use git add . to add all changes files to commit. If you only want to commit some, use git add <filename>.
  6. Run git commit and write commit message. If the file is saved successfully, the change is done.
  7. Go back to master branch with git checkout main.
  8. Merge the two branchs with git merge <new branch name>

And you've done the editing. Nice.

About

A project for practice using git during group projects, with this repository being the project manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published