An authentication code library for different code stacks
For this project frontend developers will be pulling from the 'Frontend' branch and also making pull requests to the same branch. The backend developers will be working on the 'secondary' and 'intermediate' branches. All finalized changes will be merged with the main branch after proper screening.
Frontend developers will be submitting tasks by making pull requests to the 'Frontend' branch of the parent repository
Click on the 'code' button and copy the url of the repository. On your local machine, open the command line or terminal and navigate to the directory you want to clone the repository into. In the command line window, enter git clone <enter the url you copied here>
, it should look like git clone https://github.com/<your_username>/AuthWiki_Team4.git
. Press 'Enter', your repo should be cloned into your chosen directory now Before working in your remote repository it is necessary to switch to the branch you are to work on by running git checkout origin/<branch_name>
e.g git checkout origin/intermediate
.
Before working in your remote repository it is necessary to switch to the branch you are to work on by running
git checkout origin/<branch_name>
e.ggit checkout origin/intermediate
- Stage and commit the changes made.
- When you want to push your code back to the remote repository, you should push directly to your specific branch. Run
git push origin HEAD:<branch_name>
e.ggit push origin HEAD:intermediate
.
- Fetch the changes that have been made to original repository using
git fetch origin
. - Switch to your branch(if your not already on it) using
git checkout origin/<branch_name>
e.ggit checkout origin/secondary
. - Merge the changes from your remote branch to your local branch using
git merge origin/<branch_name>
e.ggit merge origin/secondary
.
- Click on the Fork icon on the top-right of the repository's page and fork the repository. Your fork should now be created with the directory
<your_username>/AuthWiki_Team4
. Next, you need to clone it to your local machine/computer. - Click on the 'code' button and copy the url of the repo. On your local machine, open the command line or terminal and navigate to the directory you want to clone the repository into. In the command line window, enter
git clone <enter the url you copied here>
, it should look likegit clone https://github.com/<your_username>/AuthWiki_Team4.git
. Press 'Enter', your repo should be cloned into your chosen directory now. Let's proceed to the next step. - Now that your have cloned the forked repository you need to set your 'upstream' and pull from the brach you'll be working on. Refer to this part of the README to see how you can do this.
- Go the 'Issues' tab on the parent repository, here you will see all issues created. These issues have tags/categories to describe them, you can hover over them on pc to see what they represent. Every task(issue) should have a/an assignee(s), if you are assigned to a task you can click on the task(issue) to view the details.
- On your machine/computer, You can do the tasks and then stage the files or changes for commit using >
git add <file_name>
to stage a specific file or eithergit add .
orgit add -A
to stage all files/changes for commit. To check the staged files entergit status
and run - You will be saving you work in the 'resources' directory.
- '*.html' files will be saved in the 'resources/views' sub-directory.
- '*.css' files will be saved in the 'resources/css' sub-directory.
- '*.js' files will be saved in the 'resources/js' sub-directory.
- Stage and commit all changes using
git commit -m <your_commit_message>
. - Push the changes to your forked repository using
git push origin
.
- You will be submitting tasks by making pull requests to the 'secondary' branch of the parent repository
- To make a pull request, go to your forked repository page on github and navigate to the pull-request tab. From here, you can create a new pull request to the 'secondary' branch of the original repository( Note: For frontend developers, you need need to change
base: main
tobase: Frontend
), add description and submit.
NOTE: Always update your forked repo when taking on a task and before making a pull request(submission) to avoid conflicts and overrides. Check here to learn how to update your forked repository/local repository
- Your request(task submission) will then be reviewed and merged if okay.
- Navigate to the project directory and run command line or terminal. Next, we need to set our upstream repository (here, it will be the original repository
AuthWiki_Team4
). There, rungit remote add upstream https://github.com/zuri-training/AuthWiki_Team4
. - Fetch the changes that have been made to original repository using
git fetch upstream
. - Switch to your forked repository's main(default) branch(if your not already on main) using
git checkout main
orgit checkout master
if your default branch is named 'master'. - Merge the 'Frontend' branch of the upstream to your main branch using
git merge upstream/Frontend
. - Stage and commit your changes and push to reflect the changes in your remote repository using
git push origin
.