DEV Community

Avelyn Hyunjeong Choi
Avelyn Hyunjeong Choi

Posted on

5 2 2 1 1

Process of working in parallel branches in GitHub

GitHup Repo:https://github.com/avelynhc/til_tracker

Changes made for new features

In the first issue, users can now specify their desired language for the generated HTML files by using the optional argument -l or --lang.

This feature was implemented by adding a new argument option -l or --lang in yargs as below.

.option("l", {
     alias: "lang",
     describe: "Language used in generated file",
     default: "en-CA",
     type: "string",
     demandOption: false,
})
Enter fullscreen mode Exit fullscreen mode

Once the app receives the language argument by the user, it will be passed to other methods, including , including readFile(), readFolder(), and convertToHTML().

In convertToHTML()method,

<!doctype html>
<html lang="${userInput}">
...
</html>
Enter fullscreen mode Exit fullscreen mode

userInput will be replaced with actual user input.
This issue was closed by merge commit.

In the second issue, it was ensured that the program exits with appropriate error codes in all cases by using process.exit(-1).

For example,

fs.stat(argv.input, (err: any, stats: { isDirectory: () => any; isFile: () => any; }) => {
    if (err) {
        console.error(err);
        process.exit(-1);
    }
...
});
Enter fullscreen mode Exit fullscreen mode

This issue was closed by merge commit.

Process of doing merges

The first merge with the first branch (issue-6) went smoothly, but when attempting the second merge with the second branch (issue-7), a conflict arose. I had to go through the files with merge conflicts one by one, selecting the code I wanted to proceed with. After resolving the merge conflict, I pushed the final code to GitHub.

Problem I had

When changes in one branch conflicted with those in another, I initially struggled to find a solution. I turned to online resources and managed to resolve the issue. It involved identifying a few lines of conflicting code and carefully modifying them one by one. This experience demanded meticulous attention to details.

Learning opportunity

I learned how to create, manage, and merge branches efficiently, improving my proficiency in GitHub. Additionally, reviewing and providing feedback on code changes in parallel branches helped me develop code review skills and encouraged a deeper understanding of others' work. Overall, working in parallel branches in GitHub was a rich learning experience, honing my skills in version control, collaboration, risk management, and other critical aspects of software development.

What I would do differently next time

I felt overwhelmed when I had numerous branches in GitHub, so I would opt for more descriptive and standardized branch names to enhance clarity and facilitate easier identification of their purpose. Additionally, I encountered some challenges with merging conflicts while working on this project. In the future, I would prioritize addressing merge conflicts promptly and comprehensively to prevent prolonged delays in the development process.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more