DEV Community

Cover image for The Complete Dev. Startup Organization Setup with GitHub
Sadhan Sarker
Sadhan Sarker

Posted on • Updated on

The Complete Dev. Startup Organization Setup with GitHub

I found complete startups organization management solution with GitHub. As a startup Software development & technology team, we need to consider lots of things like project source code management, do teamwork, teams and build packages maintainability. In here we can configure everything in the same place. Finally, last but not last everything is free. šŸ˜‡

šŸ”° 1. Open an Organization

Open this Url https://github.com/organizations/plan . Pick a Plan that suitable for the organization. Here we choose a free plan.

Choose Plan:
alt text

Free Plan Registration Page:
alt text

In here nothing complex just put organizational information like what will be organizational account name, contact email address and finally organizational type.

Note: Don't worry the information will be changeable in future.

After hit next we are able to get a welcome page like below, we don't need to invite everyone now, we can add them later to do so hit Skip the step.

Welcome and Users Invitation Page:
alt text

Congratulation Here, we have a homepage of our organization. we need to configure a couple of things we will make it later.

Welcome and Home Page:
alt text

šŸ”° 2. Organization Settings

Select the Settings tab and we have setting information. We can update easily require information. That information is related to the organization. So filling that information we can globally tell about an organization. It is pretty simple to configure.

Here is Setting page:
alt text

šŸ”° 3. Projects Management

Now choose the Projects tab. This is a great window where we can find out which projects are going on about their metrics and more about project backlog related stuff.

Here is Project page:
alt text

šŸ”° 4. Teams Management

Now choose Teams Tab. In this simple window, we are able to control different teams. We can create invite our team members. we can also discuss and collaborate in an individual team or Whole organization. It's is cool stuff?. Team communication and collaboration is easy.

Here is our teams page:
alt text

šŸ”° 5. People Management - Do Administrative Stuff.

Now choose People Tab. In this page all the people are visible, We can do the administrative task from here. Here we can change and permit user ownership and roles So that we can do the different level of organizational administrative job.

Here is peoples management page:
alt text

šŸ”° 6. Packages Management

Now choose Packages Management. Github came with great feature. Now we can easily manage packages, binaries and build we can easily upload our common reusable packages and use them into projects. Not need to go for an external solution. Now Everything in on the same place.

Note: It has some pricing related issue, so check before using it.

Here is package management page:
alt text

šŸ”° 7. Create a New Repository

Hit Create Repository. As like as GitHub personal user account, Now we can create a personal organizational repository, It can be Public/Private.

Here is - Package Management Page:
alt text

Here is - New Repository Creation Page:
alt text

šŸ”° 8. How to Publish Project Source Code

This is an Empty Repository Page. We can follow their guidelines, But before doing that we need to set up Git client So that we can execute those commands. Else if we have an existing project already then we can just simply upload it using drag and drop by selecting upload and existing file blue link. But the command line is recommended and very convenient to do this. Once we are hands-on by dirty our hand, it will be really fun.

Here is - Empty Repository Page:
alt text

https://dev-to-uploads.s3.amazonaws.com/i/1y0r0ms765y1d9kg5ydl.png

šŸ”° 9. Learn More about Git & Commands

šŸ“— First Time Git Configuration

Before you can start using Git, you need to configure it. Run each of the following lines on the command line to make sure everything is set up.

šŸ•¹ Sets up Git with your name

git config --global user.name "<Your-Full-Name>"
Enter fullscreen mode Exit fullscreen mode

šŸ•¹ Sets up Git with your email

git config --global user.email "<your-email-address>"
Enter fullscreen mode Exit fullscreen mode

šŸ“— The seven rules of a great Git commit message

Keep in mind: This has all been said before.

  • Separate subject from the body with a blank line
  • Limit the subject line to 50 characters
  • Capitalize the subject line
  • Do not end the subject line with a period
  • Use the imperative mood in the subject line
  • Wrap the body at 72 characters
  • Use the body to explain what and why vs. how

For example:

Summarize changes in around 50 characters or less

More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of the commit and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); various tools like `log`, `shortlog`
and `rebase` can get confused if you run the two together.

Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequences of this
change? Here's the place to explain them.

Further paragraphs come after blank lines.

 - Bullet points are okay, too

 - Typically a hyphen or asterisk is used for the bullet, preceded
   by a single space, with blank lines in between, but conventions
   vary here

If you use an issue tracker, put references to them at the bottom,
like this:

Resolves: #123
See also: #456, #789
Enter fullscreen mode Exit fullscreen mode

Note: we can add multiple line commit using git commit command

šŸ“— Branching, Merging and Tagging

The git branch is a very important concept. It becomes really helpful when project co-workers are frequently working on new features development. Also, It makes the project more maintainable & integrable. If we want to contribute on any Open Source project then we need branch.

The git branch command is used to interact with Git's branches:

git branch
Enter fullscreen mode Exit fullscreen mode

It can be used to:

  • list all branch names in the repository
  • create new branches
  • delete branches

šŸ•¹ Create Branch

git branch latest
git branch footer-fix
Enter fullscreen mode Exit fullscreen mode

šŸ•¹ Switch Back and forth to different Branch.
To navigate into different branches using git checkout

 git checkout footer-fix
 git checkout -b header-fix
Enter fullscreen mode Exit fullscreen mode

Note: git checkout -b header-fix create a new branch and make it Active Branch in the code editor.

šŸ•¹ Delete Branch

git branch -d footer-fix
Enter fullscreen mode Exit fullscreen mode

šŸ•¹ See All Branches At Once

git log --oneline --decorate --graph --all
Enter fullscreen mode Exit fullscreen mode

šŸ•¹ Undo from selected Branch

# undo once, from commits
git reset --hard HEAD^
git reset --hard master^

git reset --hard HEAD^

# undo twice, from commits
git reset --hard HEAD^^
Enter fullscreen mode Exit fullscreen mode

šŸ•¹ Merge into different Branch

git merge <name-of-branch-to-merge-in-[Eg.footer-fix]>
Enter fullscreen mode Exit fullscreen mode

Note: Active branch merge with given <name-of-branch-to-merge-in>

šŸ•¹ Syncs all the available remote branches

git fetch
Enter fullscreen mode Exit fullscreen mode

šŸ•¹ Push update or changes using

git push origin master
git push origin footer-fix
Enter fullscreen mode Exit fullscreen mode

šŸ“— Merge Conflict

When multiple teams and peoples are working on a single file or branch at the same time then merging conflict occurs. To avoid these types of occurrence, we need to avoid working on the same file & branch at the same time.

šŸ•¹ Merge Conflict Indicators Explanation
The editor has the following merge conflict indicators:

  • <<<<<<< HEAD everything below this line (until the next indicator) shows you what's on the current branch

  • ||||||| merged common ancestors everything below this line (until the next indicator) shows you what the original lines were

  • ======= is the end of the original lines, everything that follows (until the next indicator) is what's on the branch that's being merged in

  • >>>>>>> heading-update is the ending indicator of what's on the branch that's being merged in (in this case, the heading-update branch)

šŸ•¹ Resolving A Merge Conflict

Git is using the merge conflict indicators to show you what lines caused the merge conflict on the two different branches as well as what the original line used to have. So to resolve a merge conflict, you need to:

  • choose which line(s) to keep
  • remove all lines with indicators

Notes: finally make new commit after resolve it manually.

šŸ“— Undoing Changes

šŸ•¹ Git reset or revert local changes until commit

$ git checkout .
Enter fullscreen mode Exit fullscreen mode

šŸ•¹ Changing The Last Commit

With the --amend flag, you can alter the most-recent commit.
like, Add Forgotten Files To Commit

git commit --amend
Enter fullscreen mode Exit fullscreen mode

šŸ“— The git revert Command

Now that I've made a commit with some changes, I can revert it with the git revert command

git log
git revert <SHA-of-commit-id-to-revert>
Enter fullscreen mode Exit fullscreen mode

This command:

  • SHA-of-commit-id-to-revert will be founded by git log
  • will undo the changes that were made by the provided commit
  • creates a new commit to record the change

šŸ•¹ Change remote origin

$ git remote set-url origin https://github.com/mesadhan/sample-app.git
Enter fullscreen mode Exit fullscreen mode

šŸ•¹ Remote origin status

$ git remote -v
Enter fullscreen mode Exit fullscreen mode

šŸ“— Relative Commit References for Back and forth

Sometimes we back

  • ^ ā€“ indicates the parent commit
  • ~ ā€“ indicates the first parent commit

Here's how we can refer to previous commits:

The parent commit ā€“ the following indicate the parent commit of the current commit

  • HEAD^
  • HEAD~
  • HEAD~1

The grandparent commit ā€“ the following indicate the grandparent commit of the current commit

  • HEAD^^
  • HEAD~2

The great-grandparent commit ā€“ the following indicate the great-grandparent commit of the current commit

  • HEAD^^^
  • HEAD~3

šŸ“— Remove Local and Remote Commit

To view commits history base on the number hit below command,

$ git rebase -i HEAD~2
Enter fullscreen mode Exit fullscreen mode

Now Remove those commit from the list and save.

Optional, You can pull, if you want to sync with the latest work then below command,

$ git pull
Enter fullscreen mode Exit fullscreen mode

Otherwise, permanently change your local and remote repository using below command,

$ git push origin master
Enter fullscreen mode Exit fullscreen mode

Note: Here, git rebase -i HEAD~2, will show last two commits. we can change the number for more commit history.

šŸ“— Git Tag Command

Git tag uses usually when we release a version for a product. It is important to know how we can tag annotations,

šŸ•¹ add a tag with annotation and version

git tag -a v1.0
git tag -a beta
Enter fullscreen mode Exit fullscreen mode

Sample Tag Commit message

Put Headline About Tag
#
# Write a message for tag:
#   v1.0
# Lines starting with `#` will be ignored 
Enter fullscreen mode Exit fullscreen mode

CAREFUL: In the command above (git tag -a v1.0) the -a flag is used. This flag tells Git to create an annotated flag. If you don't provide the flag (i.e. git tag v1.0) then it'll create what's called a lightweight tag.

Annotated tags are recommended because they include a lot of extra information such as:

  • the person who made the tag
  • the date the tag was made
  • a message for the tag

Because of this, you should always use annotated tags.

šŸ•¹ Verify Tag & Tag History

After saving and quitting the editor, nothing is displayed on the command line. So how do we know that a tag was actually added to the project? If you type out just git tag, it will display all tags that are in the repository.

git tag
git log --decorate
Enter fullscreen mode Exit fullscreen mode

šŸ•¹ Deleting A Tag

git tag -d v1.0
git tag --delete v1.0
Enter fullscreen mode Exit fullscreen mode

šŸ‘Œ Thanks for your time & passion. Feel free to ask me anything.
If you have any issues & queries. Follow me on Twitter

šŸ”° References:-

Top comments (0)