i create git branch and do something, but in main there's some hotfix pushed. so i want…
- User
i create git branch and do something, but in main there's some hotfix pushed. so i want it in my current branch. how to do it?
- Assistant
To incorporate the hotfix changes from your
mainbranch into your current branch, you'll need to merge those changes. Here’s a step-by-step guide on how to do that:-
Ensure you are working on the correct branch: First, make sure you are on your current development branch (not
main). You can switch to your branch using:bashgit checkout your-feature-branch -
Fetch the latest changes: Update your local repository with the latest changes from the remote repository. This includes the recent hotfix on the
mainbranch.bashgit fetch origin
-
- User
how to undo last commit when git push origin main? on origin and locally
- Assistant
If you've accidentally pushed a commit to the
mainbranch and need to undo it both locally and on the remote repository (origin), you can follow these steps. However, be cautious as modifying themainbranch in a way that affects other team members requires coordination.Undo the Last Commit Locally
-
Check out the
mainbranch: Make sure you are on themainbranch.bashgit checkout main -
: Use to undo the last commit locally. Choose either the or options, depending on whether you want to keep or discard your changes:
-
- User
i am on linux (ubuntu). i have nginx running in docker. and virtual host like this
server admin.local; location / {
┃ 42 │ │ proxy_pass http://host.docker.internal:9000;
43 │ }and on host i have running my dev next.js app, via bun run dev, listening on localhost:9000
but when i in browser access admin.local i got error 502 bad gateway. in docker nginx logs i have ", upstream: "http://172.17.0.1:9000/" connect() failed (111: Connection refused) while connecting to upstream, client: 172.19.0.1,
how to connect from docker nginx to host? what's wrong?
i tried add 127.0.0.1 /etc/host.docker.internal to /etc/hosts, same no luck
- Assistant