{"id":50668532,"url":"https://github.com/atomjoy/git-upstream","last_synced_at":"2026-06-08T08:34:30.891Z","repository":{"id":352399293,"uuid":"1215004585","full_name":"atomjoy/git-upstream","owner":"atomjoy","description":"Jak utworzyć upstream w repozytorium git.","archived":false,"fork":false,"pushed_at":"2026-04-19T11:42:13.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-19T12:32:31.046Z","etag":null,"topics":["git-upstream"],"latest_commit_sha":null,"homepage":"https://github.com/atomjoy/git-upstream","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atomjoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-19T10:55:49.000Z","updated_at":"2026-04-19T11:42:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/atomjoy/git-upstream","commit_stats":null,"previous_names":["atomjoy/git-upstream"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/atomjoy/git-upstream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2Fgit-upstream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2Fgit-upstream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2Fgit-upstream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2Fgit-upstream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomjoy","download_url":"https://codeload.github.com/atomjoy/git-upstream/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2Fgit-upstream/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34055249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git-upstream"],"created_at":"2026-06-08T08:34:30.712Z","updated_at":"2026-06-08T08:34:30.885Z","avatar_url":"https://github.com/atomjoy.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git upstream\n\nJak utworzyć upstream w repozytorium git.\n\n## Klonowanie repozytorium\n\nDo testów musisz podisdać dwa konta na github z dodanymi publicznymi kluczami ssh. Klucze dodasz w panelu w ustawieniach na github.com.\n\n```sh\n# Get repo\ngit clone git@github.com:username/demo.git\ngit clone https://github.com/username/demo.git\n\n# Change repo origin when you clone with https://github.com/username/demo.git\ngit remote remove origin\ngit remote add origin git@github.com:username/demo.git\n```\n\n## Uprawnienia dla VsCode\n\n```sh\n# Allow repo from different windows user\ngit config --global --add safe.directory C:/github/username/repo-name\n```\n\n## Tworzenie kluczy ssh\n\n```sh\n# Main account github ssh key in id_ed25519\nssh-keygen -t ed25519 -C \"username\"\n\n# Second github account ssh key for @example github user\nssh-keygen -t ed25519 -C \"example\" -f ~/.ssh/example_ed25519\n```\n\n## Konfiguracja repozytorium bez ssh config\n\nUruchom w katalogu repozytorium.\n\n```sh\n# Dodaj login z githuba\ngit config user.name \"username\"\ngit config user.email \"your_github_email_address\"\n\n# Dodaj klucz prywatny dodany do konta githuba\ngit config core.sshCommand \"ssh -o IdentitiesOnly=yes -i ~/.ssh/username_ed25519\"\n\n# Dodaj klucz publiczny\ngit config user.signingKey \"~/.ssh/username_ed25519.pub\"\n\n# Lista ustawień (zamknij przez :q)\ngit config --list\n```\n\n## Konfiguracja z ssh config\n\nDodaj w pliku konfiguracyjnym ssh **~/.ssh/config** ustawienia dla kluczy prywatnych.\n\n```sh\n# Main account @username\nHost username username-github.com\n  User git\n  HostName github.com\n  IdentityFile ~/.ssh/id_ed25519\n  IdentitiesOnly yes\n\n# Account @example\nHost example example-github.com\n  User git\n  HostName github.com\n  IdentityFile ~/.ssh/example_ed25519\n  IdentitiesOnly yes\n```\n\n### Jak używać hostów z ssh config\n\n```sh\n# Change origin in local repository for git cli\ngit remote add origin git@username:username/demo.git\ngit remote add origin git@username-github.com:username/demo.git\n```\n\n## Budowanie nowej funkcjonalności (contribute)\n\n1. Fork the company repository\n2. Create your feature branch **git checkout -b my-new-feature**\n3. Create and test a new feature, then add it to the staging area **git add .**\n4. Commit your changes to the branch **git commit -am 'Add some feature'**\n5. Push to the branch **git push origin my-new-feature**\n6. Create new Pull Request from GitHub page\n\n```sh\n# Once you push a new branch up to your repository.\n# Github will prompt you to create a pull request from page.\n# If not, log in to github and do it yourself.\nremote: Create a pull request for 'branch-name' on GitHub by visiting:\nremote:      https://github.com/your-user/fork-repo-url/pull/new/branch-name\nremote:\nTo github.com:your-user/fork-repo-url.git\n * [new branch-name]      branch-name -\u003e branch-name\n```\n\n## Polecenia git\n\nKilka istotnych poleceń git.\n\n### Pobieranie zmian z głównego repo przed push\n\n```sh\n# Check origins list\ngit remote -v\n# Add upstream to repo (or with https)\ngit remote add upstream git@github.com:company/repo-name.git\n# Pull code from upstream to main branch\ngit pull upstream main\n# Or with rebase not merge\ngit pull upstream main --rebase\n# Remove upstream with\ngit remote remove upstream\n```\n\n### Sprawszanie listy gałęzi\n\n```sh\n# Check branch list\ngit branch\n# Check branch list with origin\ngit branch -r\n# Change branch to main\ngit checkout main\n```\n\n### Dodawanie gałęzi\n\n```sh\n# Create branch (no nested branch in git)\ngit checkout -b fix/bug1\ngit checkout -b fix/bug2\n# A branch that looks like it's nested\ngit checkout -b fix/bug1/func1\ngit checkout -b fix/bug1/func2\n# Create branch bug3 from bug1\ngit checkout -b fix/bug3 fix/bug1/func1\n```\n\n### Usuwanie lokalnych gałęzi (z dysku)\n\n```sh\n# Delete from local\ngit branch -d my-new-feature\n# Force delete from local\ngit branch -D my-new-feature\n```\n\n### Usuwanie zdalnych gałęzi (z githuba)\n\n```sh\ngit push -d origin my-new-feature\n```\n\n### Dodawanie do gałęzi\n\n```sh\n# Add file to the staging area\ngit add .\n# Commit it to your branch --amend\ngit commit -am \"Add some feature\"\n```\n\n### Wysyłanie zmian do repo\n\n```sh\ngit push \u003cremote\u003e \u003cbranch\u003e\ngit push origin my-new-feature\ngit push origin main\ngit push --force\ngit push --tags\n```\n\n### Pobieranie zmian z repo\n\n```sh\ngit fetch \u003cremote\u003e\ngit fetch \u003cremote\u003e \u003cbranch\u003e\ngit fetch origin my-new-branch\ngit fetch origin main\ngit fetch upstream main\ngit fetch upstream upstream/feature_branch\ngit fetch upstream main --tags\ngit fetch upstream main --prune\n```\n\n### Integruje pobrane migawki z lokalnym repo\n\n```sh\n# Merge branch\ngit merge\ngit merge my-new-branch\ngit merge origin/main\ngit merge upstream/main\ngit merge upstream/feature_branch\n# Merge branch fix1 into fix2\ngit merge fix1 fix2\n# Or use rebase\ngit rebase origin/main\ngit rebase upstream/main\n```\n\n### Usuwanie wprowadzonych zmian w repo przy konfliktach z pull\n\n```sh\n# Reset changes\ngit reset\ngit reset -–hard\ngit stash --include-untracked\ngit clean -fd\n# Cancel a merge that had conflicts\ngit merge --abort\n```\n\n### Pull to fetch i merge w jednym poleceniu\n\n```sh\n# Fetch and merge in one\ngit pull\n# Git pull z rebase a nie merge\ngit pull --rebase\n# Git pull z fast-forward\ngit pull --ff-only upstream main\n# Git pull ze wszystkich zdalnych gałęzi\ngit pull --all\n```\n\n### Status i logowanie\n\n```sh\n# Check status\ngit status\n# Log changes in console\ngit log origin/main\n# Check fetched data\ngit checkout FETCH_HEAD\n```\n\n### Dodaj tag do repozytorium\n\n```sh\n# Show tags\ngit tag\n# Add tag\ngit tag 1.1\n# With comment\ngit tag -a \u003ctagname\u003e -m \"Your message here\"\n# Push to repo\ngit push origin --tags\ngit push origin \u003ctagname\u003e\n```\n\n## Git upstream image\n\n\u003cimg src=\"https://raw.githubusercontent.com/atomjoy/git-upstream/refs/heads/main/git-upstream.png\" width=\"100%\"\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomjoy%2Fgit-upstream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomjoy%2Fgit-upstream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomjoy%2Fgit-upstream/lists"}