version control - Move commits from one git repo to new git repo -


is possible move git commits new (empty) repository?

i given link git repo meanwhile want commit local repo. once remote repo created, move commits local repo remote one. have gut-feeling cheery-pick somehow help, i'm not sure how. can done?

once push local repo remote one, commits have done locally pushed (transferred, copied, replicated) remote repo, no need special. once link remote repo add remote: git remote add alias url replacing alias you'll remember (a name remote, origin used default if nothing specified) , replace url usrl of remote repo. after that, push commits remote using: git push -u alias local-branch-name:remote-branch-name where: alias - alias used in previous command local-branch-name name of local branch (use master if not sure) remote-branch-name: name of branch in remote repo (usually should same not confuse yourself, again, master in beginning). in short, assuming commits master , remote repo @ http://some.url.com/code, commands be:

git remote add origin http://some.url.com/code git push -u origin master:master 

Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -