Skip to content

Google-Developers-Group-IIIT-Lucknow/DevSphere-FOSS-Hard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GDG FOSS Hard — Git Rebase Assignment

Problem Statement

A developer implemented a user login system across two files — auth.js and login.js — but committed the changes in the wrong order. All the code is already written and present in the repository. Your task is to reorder the commits so that the implementation is logically correct.

Your Task

  1. Fork and clone this repository.

  2. Run git log --oneline to see the existing commits.

  3. Use git rebase -i to reorder the commits into the correct logical sequence.

  4. During the rebase you may encounter merge conflicts. Read each conflict carefully and decide whether to keep the current change or accept the incoming change. Resolve every conflict, then run git add and git rebase --continue.

  5. Once the rebase is complete, run the test to verify your solution:

    node test.js
    

    All tests must pass.

Rules

  • Do not edit test.js.
  • Do not add or delete any commits — only reorder them.
  • The correct order is one where each commit logically builds on the previous one (e.g., you cannot use a function before it is defined).
  • Conflict resolution should reflect the correct final behaviour of the system.

Files

  • auth.js — core authentication utilities (hashing, token generation, validation)
  • login.js — user-facing functions (register, login, logout)
  • test.js — automated test runner, do not modify

Testing

node test.js

A passing run prints each test result and exits with code 0. A failing run exits with code 1.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors