Run any program before Git | push to reduce mistakes
Solution
Register the command you want to run before push as a git alias.
 [push] default = current [alias] before-push = !bundle exec rubocop && bundle exec rake notes && echo 'sleep 10 seconds and you will push' && sleep 10 gentle-push = !git before-push && git push 
Then you can use $ git gentle-push .
Above is an example of running rubocop (Ruby's grammar checker) and notes (a task that finds annotations).
 결과
Like this.
 
↓
 
 Description
 [push] default = current [alias] before-push = !bundle exec rubocop && bundle exec rake notes && echo 'sleep 10 seconds and you will push' && sleep 10 gentle-push = !git before-push && git push 
Like this.

↓

Description
combination
It would be nice to put an alias that rebases the current branch into the "latest master" with one command in before-push.
 [push] default = current [alias] new-world = !git checkout master && git pull origin master && git checkout - && git rebase master before-push = !git new-world && bundle exec rubocop && bundle exec rake notes && echo 'sleep 5 seconds and you will push' && sleep 5 
 problem
Often you forget what you want to run before push. It is better to understand the mistake at hand.
 환경
 [push] default = current [alias] new-world = !git checkout master && git pull origin master && git checkout - && git rebase master before-push = !git new-world && bundle exec rubocop && bundle exec rake notes && echo 'sleep 5 seconds and you will push' && sleep 5 
Often you forget what you want to run before push. It is better to understand the mistake at hand.
환경
Original by
 Git | push 전에 임의의 프로그램을 실행하여 실수를 줄입니다.
 About
 About this translation
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(Run any program before Git | push to reduce mistakes), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/YumaInaura/items/94cc323a5897bdf85bb4
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
About this translation
Reference
이 문제에 관하여(Run any program before Git | push to reduce mistakes), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/YumaInaura/items/94cc323a5897bdf85bb4텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)