Quantcast
Channel: How to push new branch without history - Stack Overflow
Browsing all 5 articles
Browse latest View live

Answer by olawalejuwonm for How to push new branch without history

git checkout --orphan <name_you_choose_for_orphan_branch>git rm . -r -f

View Article



Answer by Geremia for How to push new branch without history

How can I purge all the history and push it?git checkout --orphan <name_you_choose_for_orphan_branch>git commitThen you can run yourgit push <remote-name> <branch-name>cf. this one-liner

View Article

Answer by ThinkBonobo for How to push new branch without history

I needed to do this to send a freelancer some code without sharing private information or deleting my history.In case any of you are using SourceTree, this is how I managed to do it. Please let me know...

View Article

Answer by John Szakmeister for How to push new branch without history

Purging all the files doesn't get rid of the history. You need to create a branch that has no history first, and the add your config files. These days git checkout has a --orphan option that makes a...

View Article

How to push new branch without history

I have git repo with two unrelated branches, master and configs.I've created configs, purged all the files and then placed in configuration files only.Now I want to push this on remote repo, but as it...

View Article

Browsing all 5 articles
Browse latest View live




Latest Images