You are on page 1of 7

How to go about the printf project

The truth must be said that the printf project is indeed challenging. I struggled with
mine as well, after a whole lot of research I was able to understand the concept of
collaboration, and boom, that was it. I won’t lie, i didn’t write all the codes by myself,
with the help of some other resources, i did.
I came to realise that the main goal of alx in this printf project is not even the writing of
codes, but the Art of collaboration.

In this guide I will take my precious time and document to you how you can collaborate with
your partner, to resolve the conflict between you and the printf project.

First of all, make sure that your repo is clean. What I meant is this, you and your partner
might have tried working on the project, so if your repo is not clean and you try to follow the
instructions I'll provide, things might get complicated for you. Please this is important

How to collaborate in github


Perhaps, this is the most important aspect of the printf project, remember the goal is to
learn how to collaborate as a developer, Trust me guys this is what you’ll do till you hang
boot as a Software Engineer.

Setting up For collaboration


Please practise this with your partner before you start the project.
A. AUTHOR CREATES A REPO AND GIVES COLLABORATOR ACCESS TO THE REPO.
● Create a repo in your github
● Go to your terminal and clone the repo.
E.g git clone https://github.com/Young-prof/Weather-App-Project.git
● Cd into the cloned repo
● Create a README.md file
● Git add, commit and push to the remote repo.
● Go to your GitHub repo
● Refresh your github
● Click on the Settings tab.
● Click Collaborators

● Give access with your mobile or password

● Click on add people


● Enter collaborators username


● Click on Add as a collaborator
The collaborators part
After all of this, the collaborator will receive a maile. Click on the mail, you will be redirected
to that github repo. And now you are set up to start working on your project.

I will share with you the two easiest and common ways to
collaborate on a github project.
One Branch Method
The first method is what I called the One branch method. The reason why I called it the one
branch method is because both you and your partner will work on it in the same branch,
which is the main or master branch(same things). Here is a total beginner friendly guide on
how to use the One Branch Method. Please there are about 4 different ways to collaborate
on github, but i’ll be sharing only the most vital and useful ones(Two)

After setting up the repo for collaboration, let's start to collaborate.


A Collaborator clones the repo locally on his terminal.
Please don’t panic when i say the collaborator will clone the repo, alx said we shouldn’t fork
or clone the repo, what they actually meant is that don’t fork or clone to have the repo on
your own github account, because you are a collaborator, So, you only appear as a
contributor and not a owner of the repo, i hope this clear your doubt. Just imagine it, if you
don’t clone the repo on your terminal, how will you be able to write your own codes and push
to the remote repo, it’s simple logic guys.

Clone the repo, e.g git clone https://github.com/Young-prof/Weather-App-Project.git


Then git pull to make sure that everything is up to date from the remote repo.
Now, remember we are using the One Branch method, so in other to maintain 40/60 percent
contribution.
First,
Author creates the first file, then push to the repo,
Then, Collaborator will run a git pull to have the changes updated on his own terminal.
Secondly,
Collaborator will Create the second file(Task) then git add, commit and push to the remote
repo, then, Author will run a git pull, to update his terminal.

Note: If you don’t pull, where need, and you push you’ll have error that if you are not smart
enough you’ll be stuck, remember this is the Art of collaborating, you and your partner
should wait for each other, be patient, don’t rush, remind each other if they have git pulled or
pushed, else you end up having errors that will lead to a zero score.
Remember, the goal is to have a 60/40 percent contribution, else you score zero.

Continue this process till you finish all the tasks, it’s about twelve or so in Numbers.

Very Important
The codes won’t check if you have not completed the task, so don’t border checking codes
till you are done with the tasks.
This method is more flexible compared to the New branch Method.

New Branch Method


Guys please, My system is about to go off, and i don’t
have light here, i’ll on Gen later in the evening, those in
Nigeria will understand. So I actually Copied this second
method from A block. So work with the one that suits
you.
Remember, you can do all of this in your terminal, So if
working out this in your github cli is a given issue, we
have good terminal knowledge so use it.
Take Note that most of the things you must have done in
the setting up for collaboration so please be full.

SOLO PRACTISE VIA THE GITHUB GUI


A. CREATE A REMOTE REPO IN YOUR GITHUB ACCOUNT
1. In URC, click +, then select New repository
2. Name your repository Kathy's Project.
3. Write a short description.
4. Select Initialise this repository with a README.

B. CREATE A BRANCH
1. Click drop down at the top of file list that says branch: master.
2. Type a branch name, readme-edits, into the new branch text box.
3. Select the blue Create branch box or hit “Enter” on your keyboard. Notice you
are now on the code view of your readme-edits branch, which is a copy of
master.

C. MAKE AND COMMIT CHANGES


You are now on your readme-edits branch.

1. Select the README.md file.


2. Click on the pencil icon (URC) of the file view.
3. Edit the file. Write something about yourself and your project.
4. Write a commit message at the bottom of the screen.
5. Click the Commit changes button.

D. OPEN A PULL REQUEST (PR)


1. Click on the Pull Request TAB, which takes you to the PR page
2. Click on the green New Pull Request button.
3. Select the branch you made, readme-edits, to compare with the original master.
4. Review your work.
5. Name your pull request and give it a brief description. You can use @mention in
your description to ask for feedback by specific persons.
6. Click on the green Create Pull Request button.

E. MERGE YOUR PULL REQUEST


You will merge your readme-edits branch into your master branch.

1. Click on the green Merge pull request button.


2. Click Confirm merge.
3. You can now delete the branch

Please wherever you find this,


comment on My Technical Writing
Skills, it’s very Important. Thanks
My Github Repo
Please don’t include
● .utils.c.swp and
● .swc
These files will be automatically created
when you’re done with the projects.
Please if it will cost to delete your repo and
start all over sef, please do it.
GoodLuck

You might also like