Muitos arquivos podem ser movidos diretamente no GitHub Enterprise Server, mas alguns arquivos, como imagens, precisam ser movidos a partir da linha de comando.
Esse procedimento pressupõe que você já:
- Criou um repositório no GitHub Enterprise Server ou tenha um repositório que pertence a outra pessoa com a qual deseja contribuir
- Clonou o repositório localmente em seu computador
- No seu computador, mova o arquivo para a nova localização dentro do diretório que foi criado localmente em seu computador quando você clonou o repositório.
- Abra TerminalTerminalGit Bash.
- Use
git statuspara verificar a localização antiga e nova do arquivo.$ git status > # On branch your-branch > # Changes not staged for commit: > # (use "git add/rm..." to update what will be committed) > # (use "git checkout -- ..." to discard changes in working directory) > # > # deleted: /old-folder/image.png > # > # Untracked files: > # (use "git add ..." to include in what will be committed) > # > # /new-folder/image.png > # > # no changes added to commit (use "git add" and/or "git commit -a") - Faça o stage do arquivo para commit em seu repositório local. Isso excluirá, ou
git rm, o arquivo do local antigo e adicionará, ougit add, o arquivo ao novo local.$ git add . # Adiciona o arquivo ao repositório local e faz stage dele para commit. # Para remover o stage de um arquivo, use "git reset HEAD YOUR-FILE". - Use
git statuspara verificar as alterações com stage para commit.$ git status > # On branch your-branch > # Changes to be committed: > # (use "git reset HEAD..." to unstage) > # > # renamed: /old-folder/image.png -> /new-folder/image.png # Displays the changes staged for commit - Faça o commit do arquivo em que você realizou o stage em seu repositório local.
$ git commit -m "Move file to new directory" # Commits the tracked changes and prepares them to be pushed to a remote repository. # Para remover esse commit e modificar o arquivo, use "git reset --soft HEAD~1", faça o commit e adicione o arquivo novamente. - Push the changes (Faça push das alterações</0> no seu repositório local para o sua instância do GitHub Enterprise Server.
$ git push origin your-branch # Pushes the changes in your local repository up to the remote repository you specified as the origin

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
