avatar

git reset to new repository
  • git checkout –orphan latest_branch
  • git add -A
  • git commit -am “commit message”
  • git branch -D master
  • git branch -m master
  • git push -f origin master

one line:

git checkout –orphan latest_branch && git add -A && git commit -am “commit message” && git branch -D master && git branch -m master && git push -f origin master

Author: Qin
Link: https://qinhaolei.com/posts/3126234/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Reward
  • WechatPay
    WechatPay
  • AliPay
    AliPay
  • Bitcoin
    Bitcoin

Comment