Git: Difference between revisions
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
Back on bitpost | Back on bitpost | ||
git clone mynewthang.git # to create a working copy on server, if desired | git clone mynewthang.git # to create a working copy on server, if desired | ||
|} | |||
{| class="mw-collapsible mw-collapsed wikitable" | |||
! create shared central repo for existing code | |||
|- | |||
| Create a bare repo with .git suffix | |||
git init --bare --shared mything.git | |||
Go to existing code and clone the repo next to it, with a temp name. | |||
Move .git into the existing code. | |||
Add code, add a .gitignore as needed, and you're all set. | |||
cd mything/.. | |||
git clone (bare-repo-host-and-path)mything.git mything-temp | |||
mv mything-temp/.git mything/ | |||
rm -rf mything-temp | |||
cd mything | |||
subl .gitignore # as needed | |||
git add (whatever you want to track) | |||
git commit -a -m "init repo" && git push | |||
|} | |} | ||
{| class="mw-collapsible mw-collapsed wikitable" | {| class="mw-collapsible mw-collapsed wikitable" |
Revision as of 12:17, 26 July 2017
TASKS
Expandgit new shared central bare repo |
---|
Expandcreate shared central repo for existing code |
---|
Expandgit merging conflicts after diverging |
---|
Expandgetting upstream commits into your GitHub fork |
---|
Expandgit create new branch on server, pull to client |
---|
Expandgit pull when untracked files are in the way |
---|
Expandgit create new branch when untracked files are in the way |
---|
Expandgit recreate repo |
---|
Expandgit connect to origin after the fact |
---|
Expandgit ignore local and remote changes to a file |
---|
CONFIGURATION
Expandgit visual difftool and mergetool setup |
---|
Expandgit convert to a bare repo |
---|
Expandgit convert bare to a mirror of remote (github, facebook, etc) |
---|
Expandgit create merge-to command |
---|
Expandgit fix github diverge from local bare repo following README.md edit |
---|
Expandgit windows configure notepad++ editor |
---|
Expandgit fix push behavior - ONLY PUSH CURRENT doh |
---|
Expandgit multiple upstreams |
---|
From here...