I created a local branch by using git checkout -b mybranch Then I made certain changes to it and pushed to remote with git push origin mybranch However, I cannot see my local changes in the remote mybranch. Therefore, I tried to push again: git push origin mybranch:mybranch Now I get message that everything is […]
When I type git branch i get * master localbranch but when I try to remove the branch, git branch -d localbranch i get a not found error: error: branch ‘localbranch’ not found., I also tried to force the delete with git branch -D localbranch but it’s giving me the same error. The branch was […]
If a commit was made in other branches and merged into master after the given date/time, the changes in that commit should not appear in the snapshot, even though the commit was made before the given date/time Option 2 in this answer doesn’t do the job I need, as it simply sorts the commits chronologically […]
I have git repo in folder final_app and I have to add new folder app_part which is already git project. When I copied and try git add . or git add –all but it doesn’t want to add app_part. How to add files from app_part folder to git repo final_app ?
Is there any way to set different authors for each remote or branch in Git? The only thing coming to my mind is scripting it using Git hooks (post-checkout/post-commit), which would check the current branch and change the author, but it would work only for branches, not remotes and doesn’t look elegant to me. Are […]
I have a really weird, bad scenario here. Disclaimer, I’m new to git, and I’ve kind of screwed up. SO I have lots of submodules in my fork, based on monodevelop. First: I couldn’t even update my submodules using git submodule update –init –recursive. I tried bunch of similar commands, with rebase, foreach, etc. So […]
I have remote branches such as: $ git branch -r origin/HEAD -> origin/development origin/deploy-prod origin/development origin/master I checkout origin/master as $ git checkout -b trq17 origin/master $ git branch development * trq17 Now I want to push changes in trq17 branch into remote origin/master. How can I do that?
I created a Git “newfeature” branch on my laptop, implemented a new feature, and then merged newfeature into my master branch. As I was working on the new feature, I had also created and pulled this newfeature branch on my production server in order to test it there. Now that I’m done with this branch, […]
We have several Linux servers in the office. I would like to keep some record of changes in settings. Therefore I thought it would be a good idea to put all configuration files in GIT. The setup I would like to have is as follows: bare repository –> configuration.git with a branch for every server […]
As it seems, the master branch of one of my project’s went into a completely wrong direction. So what I want to do is: Checkout an older commit Develop things into a different direction using a new branch Call this new branch master and discontinue the old master branch How do I do this? I […]