Push All Local Files of Repository to Remote
I have local repository (managed with Git) which contains all the older versions of my project and now I want to upload it to GitLab (GL) and SourceTree (ST). I created my project in the GL with link like https://gitlab.com/myusername/myproject
.
I used ST to push all my branches and tags to the origin i.e. GL repo https://gitlab.com/myusername/myproject.git
.
To verify, I cloned the repo in a demo local repo and compared the sizes and number of files of original loacal repo & demo repo and found out that there is huge difference between the two.
I doubt that files of only latest commit or checked out branch and history of revisions are uploaded to GL (and not local files related to older revisions/commits which are present in hidden folder in the local repo because I can't see them on the server in my remote repo).
How can I sync/upload all files of all commits to the remote so that I can backup of my repo in case anything happens to my local repo.
Thanks in advance.
Best Regards
do you know?
how many words do you know
See also questions close to this topic
-
Can't clone from repository of Github in Visual Studio
Recently, my visual studio can't clone from repository of GitHub.
Once it is completed clone, the visual studio will report this error "One or more errors occurred":
I cannot find any error in the output windows in visual studio.
And then, the Git Changes is blank. I can't pull and push any.
Previously I considered maybe it is the problem of my Visual Studio or Operation System.
However, after I reinstalled my Visual Studio and even reinstalled my Operation System, the problem is still here.
Soon I found a topic may relate my problem:Git has stopped working after installing VS 2022
Whereas, I tried all the ways in it and it doesn't work any.
The version of my Visual Studio is 2022 17.1.6. What's wrong with it?
-
Change CRLF to LF of all the files in repo
My repo has lots of files with CRLF. I want them to be changed to LF.
I tried to change in my working copy and commit them but the changes are ignored by git. The files with only change eol can be staged but can't be committed, right?
I can change eol and add another change on the first commit then I revert the change except for eol before next commit. But it's so dirty solution.
Why does git ignore the eol changes? Any good workaround for this?
I know
core.eol
andcore.autocrlf
in config and* text=auto
in .gitattributes but they don't help me. -
What to do when suddenly git no longer see any change in any file?
I was using git on a Laravel project but suddenly git no longer see the changes I make in any of my files. What can I do ?
-
Git - Commit and push local changes without losing file diffs?
I'm in
VSCode
and just made a ton of changes on my branch. I have a rough draft that would be a shame to lose due to to not backing up online. So naturally it would be smart togit add .
my changes, thengit push origin myBranch
to create a remote backup.But doing so will remove all my file diffs that
Visual Studio Code
's interface shows me in the sidebar (see picture below). Is there a way I can push to a remote branch but still keep the changes unstaged (or bring them back to unstaged), or any way to at least keep those diff files so I can still continue work on my local and easily be able to see everywhere that I touched? -
NetSuite Assembly Build error, "The total inventory detail quantity must be...", what is causing this?
Attempting to declare production of an assembly using the assembly build. As far as I can tell we have enough item inventory to assign the lots-bins-item-quantities to everything in the BOM. Cannot declare. Usually get an error about a particular item. Have seen that item be different on different attempts. Have looked at that item and appears we have enough. I've even decremented the BOM blow out to a lower quantity to assign inventory detail that matches.
I do notice that the "Buildable" quantity populates as about a half unit less than the build quantity I enter. This matches the "buildable" quantity shown on the WO. I don't know if these two issues are related. I can't tell how it's coming up with the buildable number or the constraint from matching the WO quantity.
Thank you.
-
How to see which commit was deployed to prod with AWS CodeDeploy
We're using
AWS CodeDeploy
for our deployment pipelines, reading from ourbitbucket
repository. I'm trying to find which commit number was last deployed to production, so that I can know what all has changed in dev since our last deploy.I've been digging around on our CodeDeploy pipelines, as well as bitbucket, but can't seem to find a commit number. Any suggestions?
-
How to remove Github PAT from Gitlab?
I recently imported a project from Github to Gitlab (Uni Owned) and I had to put my Github PAT in when importing. Now every-time I select New Project -> Import Project From Github I'm immediately taken to the list of projects on the Github account corresponding to the PAT I put in earlier.
Is there a way I can remove the Github PAT I initially put in so I'm taken to the "Provide your Github PAT" screen instead?
Thanks!
-
How do I get notified when someone creates a new Repository in Gitlab?
I need to be notified when someone creates a new Repository in a group (or in the instance) of my gitlab. I want only to be notified on new repositories, not all pull requests, merges, etc.
I have tried:
- Creating a Project Template that e-mails me when it is used. This should have worked but Projects do not run a pipeline when created from a template.
- Checking Webhooks. Webhooks provide the option to be notified on a number of things but not Repository Creation Specifically
- Checking Notifications. Similar to Webhooks.
- Extensively searching on google for anything related to creating new Repositories and notifications or triggering
There has to be some easier way to do this than setting up a service to constantly pull the list of projects and alert when it is different. Gitlab must have an integration for notifications about New Repositories.
-
Repo still uses 8 GB of quota after force push to initial commit (empty repo)
- My gitlab repo was ~8GO
- To rewrite it completely with size optimisation the idea was to reset the remote to the first commit and force push (
git checkout <initial hash>; git push -f
) - Then rewrite the history locally reducing size with compression and LFC, then force push again.
The issue is that after doing
git checkout <initial hash>; git push -f
the quota used on the repo remotely is still 8GO (and so I am not able to push the history as 8+X > Quota).What can I do to make gitlab reprocess the quota ? I triggered the warehousing but without any result.
The expected result is: quota 1ko (initial commit)
-
Updating SourceTree's browser.plist with non-existing repositories dynamically
I'd like to traverse some directories containing git repositories with my Bash script and add them to SourceTree's list if they don't exist already. I'd preferably do it with native macOS tools (e.g.
plutil
) and structure the SourceTree's list in the same way as my (sub)directories are.If I look at the
browser.plist
while my SourceTree list is empty, it looks like this:$ plutil -p /Users/xox/Library/ApplicationSupport/SourceTree/browser.plist { "$archiver" => "NSKeyedArchiver" "$objects" => [ 0 => "$null" 1 => { "$class" => <CFKeyedArchiverUID 0x600000936f60 [0x7ff861751d80]>{value = 2} "NS.objects" => [ ] } 2 => { "$classes" => [ 0 => "NSMutableArray" 1 => "NSArray" 2 => "NSObject" ] "$classname" => "NSMutableArray" } ] "$top" => { "root" => <CFKeyedArchiverUID 0x600000936ec0 [0x7ff861751d80]>{value = 1} } "$version" => 100000 }
If I add some directories and repositories to SourceTree, like in this example:
browser.plist
will look like this:$ plutil -p /Users/xox/Library/ApplicationSupport/SourceTree/browser.plist { "$archiver" => "NSKeyedArchiver" "$objects" => [ 0 => "$null" 1 => { "$class" => <CFKeyedArchiverUID 0x60000167efa0 [0x7ff861751d80]>{value = 16} "NS.objects" => [ 0 => <CFKeyedArchiverUID 0x60000167ef60 [0x7ff861751d80]>{value = 2} 1 => <CFKeyedArchiverUID 0x60000167ef80 [0x7ff861751d80]>{value = 20} ] } 2 => { "$class" => <CFKeyedArchiverUID 0x60000167f060 [0x7ff861751d80]>{value = 15} "children" => <CFKeyedArchiverUID 0x60000167f080 [0x7ff861751d80]>{value = 5} "hashValue" => <CFKeyedArchiverUID 0x60000167f0c0 [0x7ff861751d80]>{value = 19} "isLeaf" => <CFKeyedArchiverUID 0x60000167f020 [0x7ff861751d80]>{value = 4} "name" => <CFKeyedArchiverUID 0x60000167f0e0 [0x7ff861751d80]>{value = 3} "parent" => <CFKeyedArchiverUID 0x60000167f040 [0x7ff861751d80]>{value = 0} "path" => <CFKeyedArchiverUID 0x60000167f040 [0x7ff861751d80]>{value = 0} "repositoryType" => <CFKeyedArchiverUID 0x60000167f0a0 [0x7ff861751d80]>{value = 17} } 3 => "test_directory_1" 4 => 0 5 => { "$class" => <CFKeyedArchiverUID 0x60000167efa0 [0x7ff861751d80]>{value = 16} "NS.objects" => [ 0 => <CFKeyedArchiverUID 0x60000167f100 [0x7ff861751d80]>{value = 6} ] } 6 => { "$class" => <CFKeyedArchiverUID 0x60000167f060 [0x7ff861751d80]>{value = 15} "children" => <CFKeyedArchiverUID 0x60000167f120 [0x7ff861751d80]>{value = 8} "hashValue" => <CFKeyedArchiverUID 0x60000167f140 [0x7ff861751d80]>{value = 18} "isLeaf" => <CFKeyedArchiverUID 0x60000167f020 [0x7ff861751d80]>{value = 4} "name" => <CFKeyedArchiverUID 0x60000167f160 [0x7ff861751d80]>{value = 7} "parent" => <CFKeyedArchiverUID 0x60000167ef60 [0x7ff861751d80]>{value = 2} "path" => <CFKeyedArchiverUID 0x60000167f040 [0x7ff861751d80]>{value = 0} "repositoryType" => <CFKeyedArchiverUID 0x60000167f0a0 [0x7ff861751d80]>{value = 17} } 7 => "test_subdirectory_1" 8 => { "$class" => <CFKeyedArchiverUID 0x60000167efa0 [0x7ff861751d80]>{value = 16} "NS.objects" => [ 0 => <CFKeyedArchiverUID 0x60000167f180 [0x7ff861751d80]>{value = 9} ] } 9 => { "$class" => <CFKeyedArchiverUID 0x60000167f060 [0x7ff861751d80]>{value = 15} "children" => <CFKeyedArchiverUID 0x60000167f040 [0x7ff861751d80]>{value = 0} "hashValue" => <CFKeyedArchiverUID 0x60000167f200 [0x7ff861751d80]>{value = 14} "isLeaf" => <CFKeyedArchiverUID 0x60000167f1a0 [0x7ff861751d80]>{value = 11} "name" => <CFKeyedArchiverUID 0x60000167f220 [0x7ff861751d80]>{value = 10} "parent" => <CFKeyedArchiverUID 0x60000167f100 [0x7ff861751d80]>{value = 6} "path" => <CFKeyedArchiverUID 0x60000167f1c0 [0x7ff861751d80]>{value = 12} "repositoryType" => <CFKeyedArchiverUID 0x60000167f1e0 [0x7ff861751d80]>{value = 13} } 10 => "test_repo_1" 11 => 1 12 => "/Users/xox/werk/test_repo_1" 13 => 1 14 => 16224097462203018508 15 => { "$classes" => [ 0 => "STBrowserNode" 1 => "STTreeNode" 2 => "NSObject" ] "$classname" => "STBrowserNode" } 16 => { "$classes" => [ 0 => "NSMutableArray" 1 => "NSArray" 2 => "NSObject" ] "$classname" => "NSMutableArray" } 17 => 255 18 => 84843717759646174 19 => 11241636783512070445 20 => { "$class" => <CFKeyedArchiverUID 0x60000167f060 [0x7ff861751d80]>{value = 15} "children" => <CFKeyedArchiverUID 0x60000167f360 [0x7ff861751d80]>{value = 22} "hashValue" => <CFKeyedArchiverUID 0x60000167f380 [0x7ff861751d80]>{value = 27} "isLeaf" => <CFKeyedArchiverUID 0x60000167f020 [0x7ff861751d80]>{value = 4} "name" => <CFKeyedArchiverUID 0x60000167f3a0 [0x7ff861751d80]>{value = 21} "parent" => <CFKeyedArchiverUID 0x60000167f040 [0x7ff861751d80]>{value = 0} "path" => <CFKeyedArchiverUID 0x60000167f040 [0x7ff861751d80]>{value = 0} "repositoryType" => <CFKeyedArchiverUID 0x60000167f0a0 [0x7ff861751d80]>{value = 17} } 21 => "test_directory_2" 22 => { "$class" => <CFKeyedArchiverUID 0x60000167efa0 [0x7ff861751d80]>{value = 16} "NS.objects" => [ 0 => <CFKeyedArchiverUID 0x60000167f3c0 [0x7ff861751d80]>{value = 23} ] } 23 => { "$class" => <CFKeyedArchiverUID 0x60000167f060 [0x7ff861751d80]>{value = 15} "children" => <CFKeyedArchiverUID 0x60000167f040 [0x7ff861751d80]>{value = 0} "hashValue" => <CFKeyedArchiverUID 0x60000167f400 [0x7ff861751d80]>{value = 26} "isLeaf" => <CFKeyedArchiverUID 0x60000167f1a0 [0x7ff861751d80]>{value = 11} "name" => <CFKeyedArchiverUID 0x60000167f420 [0x7ff861751d80]>{value = 24} "parent" => <CFKeyedArchiverUID 0x60000167ef80 [0x7ff861751d80]>{value = 20} "path" => <CFKeyedArchiverUID 0x60000167f3e0 [0x7ff861751d80]>{value = 25} "repositoryType" => <CFKeyedArchiverUID 0x60000167f1e0 [0x7ff861751d80]>{value = 13} } 24 => "test_repo_2" 25 => "/Users/xox/werk/test_repo_2" 26 => 13314943410316335170 27 => 2273844435150619926 ] "$top" => { "root" => <CFKeyedArchiverUID 0x60000167eec0 [0x7ff861751d80]>{value = 1} } "$version" => 100000 }
Is there some simple way to modify my
plist
in a desired way given that each directory/repository is not a simple entry but an object with a bit more complex structure? -
Git stash selected files in Sourcetree
How can I stash selected files in Sourcetree using git? I am doing this to stash selected files in SourceTree.
In Tools, option, custom action, I add a new custom action that execute the command stash push -m "Login_Esteban" $FILE.
If I want to use, I select several files and click in my custom action "stash selected files"
Is there a better way, since I have to change the name of the messague in the options of Sourcetree every time?