If each team member has worked separately and you need to combine your work to complete the project, follow these steps for seamless check-in.
One-at-a-time, each team member should do the following :
- Clone the repo from GitHub (as described previously)
$ git clone paste-copied-url-here
- Create and check out a new branch (branch can be your name)
$ git checkout -b your_branch_name
- Copy the files you want to upload into the relevant folders (README into the main folder, notebooks into code, images into images, etc)
- Add the files to git. To be safe, add each individually instead of ‘add -a’ to ensure you are only adding the files you want to be included in the final check-in.
$ git add your_file_name
- Commit the set of files to git
$ git commit
- Push your branch to Github (push your branch name — NOT master)
$ git push -u origin your_branch_name
-
Go to GitHub, find your branch, issue a Pull Request
-
Reviewers review and approve the request
-
Merge the code with the main branch
-
Repeat for the next person
- Fork it
(https://github.com/yourname/yourproject/fork)
- Create your feature branch
(git checkout -b feature/fooBar)
- Commit your changes
(git commit -am 'Add some fooBar')
- Push to the branch
(git push origin feature/fooBar)
- Create a new Pull Request