Start here to move your code safely
Your code lives on GitHub now. Moving it is like moving an old shop. You pack your hand tools in a box. You unpack every box in the new room. You must plug in lights before you start your work.
Meet Nora. Nora runs a small web bread shop. Her code lives in a repository. A repository is a cloud box that keeps code and old drafts. Nora wants an AI builder to make fresh cookie forms.
Nora wants to build fast today. Yet rushing into preview tools can break old work. Read the notes before you click any start knob. Check what tools and secret keys your project needs first.
A slow start saves you hours of repair work. It keeps your online shop safe and sound. Then you can make new things without cold shocks.
- Pick the right code box and branch.
- Read notes to list each key you need.
- Make a safe test copy before your first edit.
Understand your new working copy
Importing gives you a working copy. A working copy is a local twin of your files for tests. It brings your text and your past saves. It does not bring outside web tools or secret passwords [source].
Nora sees her shop files on the screen. She must know where new text goes. Some tools keep files in the cloud. Other tools write to a local disk folder on your desk.
Never guess where your files live. A screen edit does not update GitHub by itself. Nora saves a baseline point first. A baseline is a clean start file that has no changes.
Her baseline saves her if an AI edit breaks. She compares new bugs to this clean start. That way, she knows what broke the shop [source].
Read more: GitHub: cloning a repository
Find the true shop folder
Big projects hold many small rooms. A monorepo is one big box that holds many small apps. The top room might hold setup tools. The real shop lives inside an app room below.
Nora checks her project tree with care. She reads package scripts and lockfiles. A lockfile is a list of exact parts that code needs. She makes sure the AI opens her real shop.
Do not write fake setup text to hide warnings. Hiding a warning hides your real design. Seeing a file name does not mean the AI read it. Make sure the builder loads the true file first. Look through every room before you run tasks. Nora sees her bread shop inside apps/bakery-store. Now her tools know where to go.
| Signal | Possible meaning | Next check |
|---|---|---|
| Several package.json files | Monorepo or multiple tools | Find the user-facing app and workspace command |
| Native platform directories | Mobile or desktop application | Identify device/build requirements |
| README describes a server | Backend without browser UI | Check endpoints rather than expecting a page preview |
| Generated bundle only | Source may be missing | Locate original source and reproducible build |
Protect your keys and test rows
Apps need secret words to talk to data. An environment variable is a hidden setting passed to code outside files. These settings hold server tokens and secret lock codes.
Never paste real keys into public prompt boxes [source]. Nora uses test keys with fake text. If a real key leaks out, change it at the source right away. Deleting the line does not reset the key.
Treat a missing key as a normal task. Nora sets practice keys like test-cookie-key in her file. She leaves her real payment tokens safe in her main vault.
Check outside tools when setups fail. A missing data table does not mean your code is bad. Write down each key you need before you test your site [source].
Read more: GitHub: removing sensitive data
Run your clean start project
Run the old project before you ask for help. Nora types the exact words from the setup note. A runtime is the engine that makes your code move. She notes her screen port and startup logs.
A preview can freeze on a spinning wheel. A start has many small steps. It gets files, adds parts, builds, and starts. Find which step is slow before you change code lines.
Do not mistake a flat picture for running code. A still screen looks real but has no live work. Check your log window to see if tools run [source]. Nora reads the logs for red text. She sees that port 3000 runs well. Her baseline works, so she can make a change next.
Read more: Chrome: console features reference
Make one small test change first
Start with one tiny test change. Nora changes her shop banner to say Practice Shop. A diff is a view that shows the old line and the new line. She checks her diff line by line.
Check that the preview screen shows the new words. This test shows that your tool talks to your preview [source]. If the text is missing, fix that link before you build big things.
Watch out for surprise edits from the AI. A tool might change parts you did not name. Keep your edits small and close to your one main goal.
Nora sees Practice Shop on her screen. The tool and the screen work as one team. Now she knows her setup is ready for work [source].
Read more: Playwright: testing best practices
A second use case for teams
Meet Marcus next. Marcus runs an inventory board for a parts crew. His box holds a Go server and a web screen. The top room holds only server lines and data tools.
Marcus does not start a web preview from the top room. He points the AI builder straight to the panel room. He tests server commands in a side box while testing buttons.
Marcus uses mock data rows while he edits. By testing one view at a time, his board stays fast. His team tracks parts with no broken tools.
This path shields the team from bad edits. The AI builder touches only the front panel. Marcus checks each step before he sends it to his crew.
- Point your tool at the front panel room.
- Keep server tests in a side tool.
- Use mock rows so real data stays clean.
Review files before you send them back
Check your work before you send it to GitHub. A remote branch is a line of work saved in the cloud. Do not send raw edits to your main line without a check [source].
Nora checks her branch name and all file names. If you use a local folder, do not erase work done by peers. Keep a clean twin copy on your disk for safety.
Compare your final work to your clean baseline. Make sure all old buttons still work as planned. Now your project runs well inside the tool without any breaks [source]. A clear check keeps your main work safe. It shields your peers from bad bugs. Your clean code merges with no tears.
Read more: GitHub: cloning a repository
Your clear next testing action
Now you know how to import code safely. Pick one simple project from your GitHub home today. Make a test branch and find the true web folder first.
Roseram can help you sort and check your setup files. Access and limits depend on your plan. Add your test keys, make one small edit, and check your view. Take small steps as you build new things.
Inspect my imported repository at apps/bakery-store. Look at package.json and tell me the exact command needed to run the preview server. Do not edit any files yet.
Your idea. Your next step.
Put Roseram super intelligence to work.
Bring the idea you keep coming back to. Choose a Roseram plan, then give your project a clear first task. You can think it through, build a first version, and improve it as you learn.
Check current access, plan limits, and pricing before joining.
Your next step
Your quick checklist.
Tick a step as you finish it. Your ticks and feedback stay on this device. They are not public reviews.
0 of 6 complete
Tell the community what you tried or tell us what needs fixing. Include a source if you are correcting a fact.
Your questions, answered
Why does an imported repository have no preview?
It might not be a website. The main folder might be wrong. A setup step may have failed.
Does editing an imported copy update GitHub?
No. Your edits stay on your screen. You must send them with pushes. A push uploads your new work.
Should the agent recreate package.json?
No. Keep your main setup file. Only remake files if they vanish. You must know your tools first.
What should I do if a private key leaks?
Turn off the key right away. Make a new key at once. File history keeps leaked old keys.
Want the technical details?Open the code notes, deeper checks, and common questions.
These notes go deeper. Use the parts that fit your project. Examples are for learning; they are not claims that we tested your app.
Understand what an import actually gives you
A repository contains source and history, not necessarily a complete running environment. Cloning or importing obtains a working copy. It does not supply every secret, database, external service, operating-system package or build artifact the application relies on. The imported directory might also contain several applications with different commands.
Establish where edits will be made. For a hosted workspace, identify the active project, branch and revision. For a local folder, confirm whether the workspace has a copied file snapshot or an explicit directory handle that can write back. Never assume that a change visible in an editor has replaced the file on your desktop or updated GitHub.
Record the original commit and use a branch or recoverable snapshot before the first agent change. The baseline is your comparison point when an apparently unrelated configuration edit breaks the preview. Keep publication separate from import so a repair can be reviewed before it reaches the source others depend on.
Read more: GitHub: cloning a repository
Find the real application directory and runtime
Read the README and inspect the directory tree. A root package file may orchestrate a monorepo while the website lives under an apps directory. A repository might be a native app, server, library, game engine or documentation project rather than a browser application. Identify its language and output before choosing a preview mechanism.
For a JavaScript website, inspect package scripts, package-manager lockfiles, workspace definitions and the framework entry point. Use the documented package manager and command. Do not add a random development script just to suppress an unsupported-runtime message. That can conceal the actual project type and make the next failure harder to explain.
Separate source loading from path indexing. Seeing a file name in a tree does not mean the agent has read its contents. Ensure that package configuration, entry points and files involved in the requested change are actually loaded. Ask for additional source when needed rather than letting the model guess how an unavailable module behaves.
| Signal | Possible meaning | Next check |
|---|---|---|
| Several package.json files | Monorepo or multiple tools | Find the user-facing app and workspace command |
| Native platform directories | Mobile or desktop application | Identify device/build requirements |
| README describes a server | Backend without browser UI | Check endpoints rather than expecting a page preview |
| Generated bundle only | Source may be missing | Locate original source and reproducible build |
Reproduce configuration without exposing secrets
List required variable names and what each controls. Distinguish public build configuration from privileged server credentials. Use example files with placeholders and keep actual secrets in the appropriate environment store. Do not paste production tokens into an article, public prompt, source file or browser bundle.
Run with a test environment where possible. A preview connected to production data can make an innocent-looking agent change consequential. Limit permissions and use sample records. If a secret is discovered in an imported repository, rotate it and inspect history; simply adding the current file to an ignore list does not revoke the exposed value.
Document external dependencies as operational requirements. A missing database table, expired OAuth permission and unavailable preview runtime are different problems. Capture the failing stage and response before deciding that the repository itself is broken.
Read more: GitHub: removing sensitive data
Run the unmodified project and capture the first failure
Before editing, install the documented dependencies and execute the documented command. Record the working directory, runtime version, port and relevant output. If startup fails, investigate the earliest actionable error instead of changing every warning. A browser connection failure may simply mean the server never started.
Treat a stuck preview as a sequence: obtaining source, installing dependencies, building, starting a process, discovering its address and loading that address. Ask which stage is active and how long it has been running. A spinner without stage information is insufficient evidence to distinguish slow work from a blocked process.
Do not infer a live application from a fallback static screen. A static artifact may be useful for editing or visual review while backend behavior is unavailable. Label that boundary and test the real process when it becomes available. Native or non-web repositories need a suitable runner rather than a simulated website preview.
Make a small change and follow it into the preview
Begin with a visible, low-impact change in a known source file. Confirm the editor saved it, the preview runtime received the same revision and the browser displays it. That creates a source-to-render trace before you ask for a complex feature. If the trace fails, fix synchronization rather than repeatedly rewriting the component.
For each agent patch, inspect the diff and run the relevant checks. Watch for accidental edits to generated output, unrelated lockfile churn and replacement of project conventions with a new framework. An imported project should be understood and improved, not silently rebuilt around a different stack.
When a change introduces an error, preserve the error and changed revision. Compare with the baseline and narrow the difference. Use the testing guide for behavior-based checks and the deployment guide for production-only conditions. Keep local success and deployed success as separate evidence.
Read more: Playwright: testing best practices · Chrome: console features reference
Review before pushing, merging or writing back locally
Confirm repository owner, repository name, branch, permissions and the exact reviewed revision. A new repository publication and a merge into an existing project are different actions. Do not overwrite the default branch just because the preview looks correct. Use the team’s review and deployment process.
For local folders, identify the authorized destination and compare it with the working copy. Avoid overwriting changes made outside the workspace since import. A safe write-back flow should detect conflicts or provide a reviewable export. Keep a backup before replacing files that others may be editing.
Common questions
Why does an imported repository have no preview?
It may not be a web application, the app root may be wrong, required source or configuration may be missing, or a runtime stage may have failed. Locate the failing stage before changing source.
Does editing an imported copy update GitHub?
No. Updating a working copy and publishing to a remote are separate operations requiring the appropriate destination and permissions.
Should the agent recreate package.json?
Only when the project genuinely lacks the required configuration and the intended stack is understood. Replacing valid configuration to suppress an error can break the existing application.
Where the facts come from
Use these links to check the technical facts. The stories here are made-up examples to help you learn. Roseram sells AI tools; our examples are not promises of results.
- GitHub: cloning a repository ↗
What this source covers
Obtaining a local working copy; editing a copy does not itself update the remote.
- GitHub: removing sensitive data ↗
What this source covers
Revoking exposed credentials and the limits of deleting them from the current file.
- Playwright: testing best practices ↗
What this source covers
Tests based on user-visible behavior and isolated test state.
- Chrome: console features reference ↗
What this source covers
Inspecting messages, stack traces and network errors.
References last reviewed 2026-10-11. Writing refreshed 2026-10-14. Spot a mistake? Tell us.