Category "git-push"

Can't push to private repository

By mistake i pushed .env file to github and then i wanted to hide .env file from my private github repo using .gitignore. For this purpose, i did many stupid th

[email protected]: Permission denied (publickey)

I created a new remote repository and tried to use git push -u origin master command to push my local files into the new repository the first time after I add i

Why is `git push --force-with-lease` failing with "rejected ... stale info" even when my local repo is up to date with remote?

I'm trying to force push a rebase of a feature branch to a remote repository. To be a bit safer, I'm trying to use --force-with-lease to make sure no other chan

! [rejected] master -> master (fetch first)

Is there a good way to explain how to resolve "! [rejected] master -> master (fetch first)'" in Git? When I use this command $ git push origin master it d

Short flag for `git push --force-with-lease`?

I've begun using git push --force-with-lease rather than --force in most cases for the additional branch protection: git push --force-with-lease vs. --force I m

Folders not pushed to Git remote repository

I am trying to push my project folder to my repository on GitHub. The project has two separate folders, one for back end and one for front end. I gave the follo

Is there any way to make a draft pull request using git bash?

I want to make a draft pull request but when I execute the command git push --set-upstream origin new-branch I could only see normal pull request button at my r

Git pull from someone else's fork

We are two students working on our online repository (different repo) that is forked from a common upstream repo. Let's say other student made Changes, Commit

How can I push a local Git branch to a remote with a different name easily?

I've been wondering if there's an easy way to push and pull a local branch with a remote branch with a different name without always specifying both names. For

Is there a way to cache https credentials for pushing commits?

I recently switched to synchronizing my repositories to https:// on GitHub (due to firewall issues), and it asks for a password every time. Is there a way to c

Git push hangs when pushing to Github?

Git push hangs everytime I try to push to github. I am using Cygwin and Windows 7. Git functions fine locally tracking branches, providing status, setting globa