####1: How to make a new branch from scratch
Please consider your directory you are applying these command to
- clone the repo on your local machine
git clone https://github.com/0abdullah0/SWE-Team17.git
- change your directory to the repo
cd SWE-Team17/
- create your branch , BRANCH NAME SHOULD BE THE NAME OF THE FUNCTION
git checkout -b YOURBRANCHNAME
#####2:Starting the Development 1.Create a new class inside the package Team17
- Add all of your logic (functions , variables , ..etc ) inside your class
2.make an instance in the main in the right places , for example if your function countes the prime numbers then your should search in the switch case statement for the right place and remove the comment and put your class instance
so for example search for the place in the code
here its case no.8 , so it should be something like this
and finally add your class to case where it runs all of the functions which CASE 18
#####3:Makeing a new Pull Request after finishing coding , we need to push our code to our branch to make a new pull request **PLEASE DO NOT ADD ALL FILES TO BE PUSHED CHOOSE ONLY YOUR CLASS AND THE MAIN CLASS **
you can add only your files by getting the modifed files
git status
which returned for me for example
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: src/Team17/Main.java
modified: src/Team17/NegativeToZero.java
Untracked files:
(use "git add <file>..." to include in what will be committed)
.idea/
Swe-Project-17.iml
so to choose main class and my class only
git add -- src/Team17
which will add all the changes that was made inside src/Team17 directory to be commited
git commit -m 'a breif description of what this commit is for example is it a fix for something or is a new fuction '
and at last to push your code
git push origin BRANCHNAME
for example --
Then create a new pull request by copying the link in the prev image or go to your branch in github and press on an new pull request
then just put any comments you want and create a pull and wait for review to approve and merge