github - problems in git pull origin <branch name> -
i want upload modification in bitbucket repository local system. process of upload code on bitbucket repository
git branch git branch -a git checkout <branch_name> git add . git commit -m "message" git push origin <branch_name> git status
i have done above process uploading code on bitbucket repository, , modified file , code uploaded in particular branch. but when fetched repository particular branch @ server file fetched , file missed (i used below proceess fetching code bitbucket repository)
login in server , go project folder git pull origin <branch_name> got following error => error in app/controllers/index_controller.rb app/models/index.rb app/views/index.html.erb db/schema.rb , on
then followed these command
git stash save --keep-index git stash drop git reset file_path(app/controllers/index_controller.rb) git pull origin +branch_name sudo service apache2 restart
i followed above process fetched file bitbucket repository , file missed. so please me tried 6 8 times got same problems, wrong , mistake
depends on branch in. try first
git fetch --all
above list branches , checkout on required branch, pull there normal.
remember make sure pull /push being done on same branches ie. if in master branch of local repo push same master branch of bitbucket. in case sure latest code on bitbucket can try git pull -f origin
(-f force fetch bitbucket local)
Comments
Post a Comment